Method: MessageBus::Backends::Redis#global_backlog
- Defined in:
- lib/message_bus/backends/redis.rb
#global_backlog(last_id = 0) ⇒ Array<MessageBus::Message>
Get messages from the global backlog
218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/message_bus/backends/redis.rb', line 218 def global_backlog(last_id = 0) items = pub_redis.zrangebyscore global_backlog_key, last_id.to_i + 1, "+inf" items.map! do |i| pipe = i.index "|" = i[0..pipe].to_i channel = i[pipe + 1..-1] m = (channel, ) m end items.compact! items end |