Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #14 from pavel-drobushevich/patch-1

Message always publish to localhost. Reuse base 'channel' method to publ...
  • Loading branch information...
commit 248e69fb37c629d52298b9676bba885c72eea0b5 2 parents a582ef5 + 961b21b
@majek majek authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  ruby/rpc_client.rb
View
2  ruby/rpc_client.rb
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.