Skip to content

Commit b5dd928

Browse files
author
Michael Klishin
committed
Use the channel we open
1 parent e66cf57 commit b5dd928

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby-amqp/new_task.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
queue = channel.queue("task_queue", :durable => true)
99
message = ARGV.empty? ? "Hello World!" : ARGV.join(" ")
1010

11-
AMQP::Exchange.default.publish(message, :routing_key => queue.name, :persistent => true)
11+
channel.default_exchange.publish(message, :routing_key => queue.name, :persistent => true)
1212
puts " [x] Sent #{message}"
1313

1414
EM.add_timer(0.5) do

0 commit comments

Comments
 (0)