The message emitted from this new class should be MessageBuffer::Message objects. This will be compatible with all channel consumers.
Preferably this upgrade is done in a way that's compatible with live production upgrades (e.g. the Lua scripts we load for publishing shouldn't corrupt the message buffer arrays during a rolling restart)
Instead of grabbing all the messages from the message buffer and calculating offsets in Ruby, do it all on Redis.
The
MessageBuffer
class is a good place to start. https://github.com/firehoseio/firehose/blob/message-buffer/lib/firehose/server/message_buffer.rb. Be sure the test suite passes for whatever is implemented in place.The message emitted from this new class should be
MessageBuffer::Message
objects. This will be compatible with all channel consumers.Preferably this upgrade is done in a way that's compatible with live production upgrades (e.g. the Lua scripts we load for publishing shouldn't corrupt the message buffer arrays during a rolling restart)
Some work started for this at https://github.com/firehoseio/firehose/tree/message-buffer-redis. This branch may not be necessary depending on how we calculate the offsets for Redis.