AMQP participant and listener pair for ruote.
See #RuoteAMQP::Listener and #RuoteAMQP::Participant for detailed documentation on using each of them.
RuoteAMQP uses durable queues and persistent messages by default, to ensure no messages get lost along the way and that running expressions doesn't have to be restarted in order for messages to be resent.
Ensure the AMQP connection is started
# File lib/ruote-amqp.rb, line 40 def start! return if started? mutex = Mutex.new cv = ConditionVariable.new Thread.main[:ruote_amqp_connection] = Thread.new do Thread.abort_on_exception = true AMQP.start { started! cv.signal } end mutex.synchronize { cv.wait(mutex) } MQ.prefetch(1) yield if block_given? end
Check whether the AMQP connection is started
# File lib/ruote-amqp.rb, line 62 def started? Thread.main[:ruote_amqp_started] == true end
Generated with the Darkfish Rdoc Generator 2.