<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi<br>
<br>
I have had a look at the Queuing Consumer example given at
<a class="moz-txt-link-freetext" href="http://www.rabbitmq.com/api-guide.html">http://www.rabbitmq.com/api-guide.html</a><br>
<br>
<pre class="sourcecode"><b>boolean</b> autoAck = <b>false</b>;
QueueingConsumer consumer = <b>new</b> QueueingConsumer(channel);
channel.basicConsume(queueName, autoAck, consumer);
<b>while</b> (<i>/* decide whether to continue reading */</i>) {
QueueingConsumer.Delivery delivery;
<b>try</b> {
delivery = consumer.nextDelivery();
        
} <b>catch</b> (InterruptedException ie) {
<b>continue</b>;
}
<i>//MY APPLICATION CODE
</i> channel.basicAck(delivery.getEnvelope().getDeliveryTag(), <b>false</b>);
}</pre>
<br>
I want to pass the message to a Separate Java Runnable Class (I am
using Java ThreadPool Executors).<br>
So I want to know how can the separate thread acknowledge the
message.<br>
I believe the message gets re-enqueued once the channel is closed.<br>
<br>
Also how can I handle channel closing down or going stale (due to
reasons like network outage) in the above scenario.<br>
<br>
-Abhishek Kona<br>
</body>
</html>