Method: Krakow::Consumer::Queue#push
- Defined in:
- lib/krakow/consumer/queue.rb
#push(message) ⇒ self Also known as: <<, enq
Push new message into queue
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/krakow/consumer/queue.rb', line 71 def push() unless(.is_a?(FrameType::Message)) abort TypeError.new "Expecting `FrameType::Message` but received `#{message.class}`!" end do |collection| begin collection[.connection.identifier] << pop_order << .connection.identifier rescue Celluloid::DeadActorError abort Error::ConnectionUnavailable.new end end signal(:new_message) current_actor end |