# File lib/mq.rb, line 138 def initialize connection = nil raise 'MQ can only be used from within EM.run{}' unless EM.reactor_running? @connection = connection || AMQP.start conn.callback{ |c| @channel = c.add_channel(self) send Protocol::Channel::Open.new } end