Message always publish to localhost. Reuse base 'channel' method to publ... #14

Merged
merged 1 commit into from Jul 23, 2012
Jump to file or symbol
Failed to load files and symbols.
+1 −1
Split
View
@@ -33,7 +33,7 @@ def call(n, &block)
corr_id = rand(10_000_000).to_s
self.requests[corr_id] = nil
self.callback_queue.append_callback(:declare) do
- AMQP::Exchange.default.publish(n.to_s, :routing_key => "rpc_queue", :reply_to => self.callback_queue.name, :correlation_id => corr_id)
+ self.channel.default_exchange.publish(n.to_s, :routing_key => "rpc_queue", :reply_to => self.callback_queue.name, :correlation_id => corr_id)
EM.add_periodic_timer(0.1) do
# p self.requests