Hi -<br><br>I have several consumers reading from the same queue.� I would like<br>to be able to interrupt their pending read to suspend and resume any<br>one of them.�� I&#39;ve played around with:<br><br><div style="margin-left: 40px;">
Channel.basicCancel(consumerTag) : don&#39;t know how to resume<br>Channel.abort()��� produces com.rabbitmq.client.ShutdownSignalException<br>Channel.close()�� produces com.rabbitmq.client.ShutdownSignalException<br></div>
<br>The close() and abort() methods seem to act about the same.� I can resume<br>reading from the queue by creating a new channel and a new QueueingConsumer.<br>I could not figure out how to resume after a basicCancel.<br>
<br>Is using close() and then re-constructing the channel and QueueingConsumer<br>the right way to go?� Will resources be properly taken care of by garbage collection?<br><br>BTW - I use the consumerTag returned by Channel.basicConsume(queueName, consumer)<br>
for the argument to Channel.basicCancel, eg: <b><i>amq.ctag-1m/H7+SDcZpbzTMgsUyhNg==</i></b> .<br>When called, it prints:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Consumer null method handleCancelOk for channel AMQChannel(amqp://<a href="http://guest@172.20.125.34:5672/,1">guest@172.20.125.34:5672/,1</a>) threw an exception:</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">java.lang.NullPointerException</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">��� at com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:728)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">��� at com.rabbitmq.client.impl.ChannelN$2.transformReply(ChannelN.java:721)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">��� at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.handleCommand(AMQChannel.java:327)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">��� at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:162)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">��� at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:110)</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">��� at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:456)</span><br style="font-family: courier new,monospace;"><br>Thanks for any hints,<br><br>- Jim<br>
<br clear="all">Jim Irrer � � <a href="mailto:irrer@umich.edu">irrer@umich.edu</a> � � � (734) 647-4409<br>University of Michigan Hospital Radiation Oncology<br>519 W. William St. � � � � � � Ann Arbor, MI 48103<br>