[rabbitmq-discuss] Java Client Using DefaultConsumer vs QueueingConsumer
stammailbox at gmail.com
Sun Apr 6 07:32:29 BST 2014
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?
> Software Engineer, Pivotal/RabbitMQ
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rabbitmq-discuss