lib/alephant/publisher/queue/processor.rb in alephant-publisher-queue-2.5.0 vs lib/alephant/publisher/queue/processor.rb in alephant-publisher-queue-2.6.0
- old
+ new
@@ -8,13 +8,15 @@
def initialize(opts = nil)
@opts = opts
end
- def consume(msg)
- return if msg.nil?
- write(msg)
- msg.delete
+ def consume(message_collection)
+ return unless message_collection && message_collection.size > 0
+
+ message = message_collection.first
+ write(message)
+ message.delete
end
private
def writer_config