You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The message is never published. If you remove the break, then it is. What should I be doing here to ensure that the message is sent, and then leave the EventMachine loop when it is?
The text was updated successfully, but these errors were encountered:
EM.run {
amq = MQ.new
queue = amq.queue("whatev")
amq.callback {
puts "Callback fired!"
break # It'll cause LocalJumpError, but otherwise it does what you want.
}
queue.publish({"foo" => "bar"})
}
Try running the following Ruby file:
The message is never published. If you remove the
break
, then it is. What should I be doing here to ensure that the message is sent, and then leave the EventMachine loop when it is?The text was updated successfully, but these errors were encountered: