Needed commands (mirroring from Redis event transport):
xadd
xread_group
xpending
xclaim
xrevrange
This requires:
- Messages
- Groups
- Consumers
We will need to be able to:
- Determine which message each group is up to
- Determine which consumers are currently processing a message
- Upto one consumer from each group can be processing a message
- Each consumer can be processing multiple messages at any one time
Potential schema outline:
messages
id SERIAL INT
created_at TIMESTAMPTZ
stream VARCHAR(255)
content JSONB
groups
id SERIAL INT
name VARCHAR(255)
stream VARCHAR(255)
latest_id INT
pending_messages
message_id INT
consumer_name VARCHAR(255)
claimed_at TIMESTAMPTZ
Potentially move each stream into its own table.
Note: The old transaction event transport was deleted in 899e9b5
Needed commands (mirroring from Redis event transport):
xaddxread_groupxpendingxclaimxrevrangeThis requires:
We will need to be able to:
Potential schema outline:
messagesid SERIAL INTcreated_at TIMESTAMPTZstream VARCHAR(255)content JSONBgroupsid SERIAL INTname VARCHAR(255)stream VARCHAR(255)latest_id INTpending_messagesmessage_id INTconsumer_name VARCHAR(255)claimed_at TIMESTAMPTZPotentially move each stream into its own table.
Note: The old transaction event transport was deleted in 899e9b5