[rabbitmq-discuss] ruby RPC client delivery_info.consumer.cancel

Philippe T'Seyen philippe at automate-dev.com
Sun Aug 25 16:24:06 BST 2013



The RPC example on the rabbitmq website mentions: delivery_info.consumer.cancel to cancel the subscribe loop.

In newer versions of Bunny I think this should become *channel**.consumers[delivery_info.consumer_tag].cancel* ?

However my ruby rpc client is not behaving as expected: the client hangs and does not return the result.

The code is over here: https://gist.github.com/anonymous/6334383

And this is the logging that is generated. The stacktrace is generated once I stop the debug session.

send_message
result from server "{\"exception\":\"java.lang.NullPointerException\\n\\tat com.automatedev.releasequeue.debian.metadata.impl.handler.MetadataReader.getControlContent(MetadataReader.java:70)\\n\\tat com.automatedev.releasequeue.debian.metadata.impl.handler.MetadataReader.getMetadata(MetadataReader.java:32)\\n\\tat com.automatedev.releasequeue.debian.metadata.impl.handler.MetadataHandler.getMetadata(MetadataHandler.java:46)\\n\\tat com.automatedev.releasequeue.debian.metadata.impl.handler.MetadataHandler.handleMessage(MetadataHandler.java:32)\\n\\tat com.automatedev.releasequeue.debian.message.impl.MessageBeanImpl.handleMessage(MessageBeanImpl.java:98)\\n\\tat com.automatedev.releasequeue.debian.message.impl.MessageBeanImpl.receiveAndHandleMessage(MessageBeanImpl.java:78)\\n\\tat com.automatedev.releasequeue.debian.message.impl.MessageBeanImpl$1.run(MessageBeanImpl.java:65)\\n\\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)\\n\\tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)\\n\\tat java.util.concurrent.FutureTask.run(FutureTask.java:166)\\n\\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)\\n\\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)\\n\\tat java.lang.Thread.run(Thread.java:722)\\n\"}"
/home/philippe/.rvm/gems/ruby-1.9.3-p286 at releasequeue/gems/bunny-0.9.0.pre10/lib/bunny/consumer_work_pool.rb:48:in `join': Interrupt
	from /home/philippe/.rvm/gems/ruby-1.9.3-p286 at releasequeue/gems/bunny-0.9.0.pre10/lib/bunny/consumer_work_pool.rb:48:in `block in join'
	from /home/philippe/.rvm/gems/ruby-1.9.3-p286 at releasequeue/gems/bunny-0.9.0.pre10/lib/bunny/consumer_work_pool.rb:48:in `each'
	from /home/philippe/.rvm/gems/ruby-1.9.3-p286 at releasequeue/gems/bunny-0.9.0.pre10/lib/bunny/consumer_work_pool.rb:48:in `join'
	from /home/philippe/.rvm/gems/ruby-1.9.3-p286 at releasequeue/gems/bunny-0.9.0.pre10/lib/bunny/queue.rb:187:in `subscribe'
	from /home/philippe/projects/releasequeue/script/rpc.rb:18:in `send_message'
	from /home/philippe/projects/releasequeue/script/rpc.rb:32:in `<top (required)>'
	from -e:1:in `load'
	from -e:1:in `<main>'

Any help is appreciated!

Philippe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130825/df127baa/attachment.htm>


More information about the rabbitmq-discuss mailing list