[rabbitmq-discuss] Java Client Using DefaultConsumer vs QueueingConsumer

rails stammailbox at gmail.com
Sun Apr 6 07:32:29 BST 2014


Thanks.
On this
<http://www.rabbitmq.com/releases/rabbitmq-java-client/v3.2.4/rabbitmq-java-client-javadoc-3.2.4/com/rabbitmq/client/QueueingConsumer.html>
one.
Search for deprecated in the page



On Thu, Apr 3, 2014 at 6:04 PM, Michael Klishin <mklishin at gopivotal.com>wrote:

> On 3 April 2014 at 18:09:06, rails (stammailbox at gmail.com) wrote:
> > > 1. My DemoConsumer inherits from DefaultConsumer
> > I have noticed that working this way handleDelivery() is invoked
> > from ThreadPool.
> > (printing Thread.currentThread().getName() I see pool-1-thread-1/2/3/4
> > eachtime.
> > I have also tested it several times and saw that the order is saved.
> > Just to make sure - since different threads call handle delivery
> > - will it mess my order?
>
> By default the pool has 5 threads, so yes. You can provide your own
> executor on ConnectionFactory, e.g. to use a single threaded executor.
>
> > 2. QueueingConsumer All of the java tutorial use QueueingConsumer
> > to consume messages.
> > In the API Docs it is mentioned as a deprecated class.
> > Should I change my code to inherit from DefaultConsumer use it?
> > Is the tutorial outdated?
>
> I believe it was undeprecated after some of its limitations
> were documented . On what pages do you see this mentioned?
> --
> MK
>
> Software Engineer, Pivotal/RabbitMQ
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140406/2044a06c/attachment.html>


More information about the rabbitmq-discuss mailing list