Class: Tackle::Consumer::DeadQueue
- Defined in:
- lib/tackle/consumer/dead_queue.rb
Instance Attribute Summary
Attributes inherited from Queue
Instance Method Summary collapse
-
#initialize(exchange, connection, logger) ⇒ DeadQueue
constructor
A new instance of DeadQueue.
- #publish(message) ⇒ Object
Methods inherited from Queue
Constructor Details
#initialize(exchange, connection, logger) ⇒ DeadQueue
Returns a new instance of DeadQueue.
5 6 7 8 9 10 11 |
# File 'lib/tackle/consumer/dead_queue.rb', line 5 def initialize(exchange, connection, logger) name = "#{exchange.name}.dead" = { :durable => true } super(name, , connection, logger) end |
Instance Method Details
#publish(message) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/tackle/consumer/dead_queue.rb', line 13 def publish() .log_error "Pushing message to '#{name}'" @amqp_queue.publish(.payload) .log_error "Message pushed to '#{name}'" rescue StandardError => ex .log_error "Error while pushing message exception='#{ex}'" raise ex end |