activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: AMQ-CMS - questions about threads/producerthreads in AMQ
Date Mon, 07 Mar 2011 08:28:30 GMT
Hello Timothy,

> Creating a Consumer object and registering a MessageListener will result
> in messages being received in a separate thread, so there's not really
> any need to create a new thread for your consumer.

That explains the count of threads upon debugging. I already thought that
may be the case, but its good to have it confirmed.

> This is commonly done using a Blocking Queue, the producer thread waits
> on something being enqueued and once it is, it dequeues it and does
> whatever work is needed.

But with a queue there would be a problem that if a subscriber gets
offline due networking reasons, the messages would stack until a memory
error occurs, or?

And with a "Blocking Queue" you mean simply a sync Queue or? Are there
samples for this?

Thanks for the help!

Best regards,

View raw message