Hi everyone,<br><br>I'm a RabbitMQ newbie. I try some code with the java client. Offical site tutorial codes are just fine with QueueingConsumer. But then I saw this at javadoc:<br><br><blockquote style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">QueueingConsumer is now deprecated in favour of implementing Consumer directly or extending DefaultConsumer</blockquote><br><br>Then I saw an example usage at <a href="http://www.rabbitmq.com/api-guide.html">api guide</a><br><br><blockquote style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote"><pre class="sourcecode"><b>boolean</b> autoAck = <b>false</b>;
channel.basicConsume(queueName, autoAck, "myConsumerTag",
<b>new</b> DefaultConsumer(channel) {
@Override
<b>public</b> <b>void</b> handleDelivery(String consumerTag,
Envelope envelope,
AMQP.BasicProperties properties,
<b>byte</b>[] body)
<b>throws</b> IOException
{
String routingKey = envelope.getRoutingKey();
String contentType = properties.contentType;
<b>long</b> deliveryTag = envelope.getDeliveryTag();
<i>// (process the message components here ...)</i>
channel.basicAck(deliveryTag, <b>false</b>);
}
});</pre></blockquote><br><br>but it never worked for me. api guide says:<br><br><blockquote style="margin: 0px 0px 0px 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;" class="gmail_quote">The Java client library distribution is shipped with a
         <span class="code ">rabbitmq-client-tests.jar</span>, containing several
         small example programs for exercising the functionality of
         the RabbitMQ server. The source code for these examples is
         in the <span class="code ">test/src</span> folder in the source
         distribution.
</blockquote><div><br>unfortunately, there isn't such example, all of the consumer codes uses QueueingConsume. </div><br>So, is there a full working example of "DefaultConsumer" or using QueueingConsumer is just fine?<br><br>Thanks in advance ...<br>