activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: NMS C# and consumer.prefetchSize
Date Thu, 01 Oct 2009 23:42:03 GMT
On Thu, 2009-10-01 at 16:10 -0700, lujan99 wrote:
> 
> fine , thanks. When I use ClientAcknowledge it's all ok.
> 
> Now, in a Request/Response method is safe to use same session object used to
> receive message to create a producer to reply??
> 

Yes, however just as in JMS the NMS API recommends the following.

If a client desires to have one thread produce messages while others
consume them, the client should use a separate session for its producing
thread.

Regards
Tim.


> 
> Thanks!!
> 
> 
> magellings wrote:
> > 
> > What acknowledgement mode are you using?  It's my understanding if you are
> > using Transactional or ClientAcknowledge you shouldn't have this problem.
> > 
> > With AutoAcknowledge messages are buffered on the consumer end and are
> > lost if not processed when the consumer shuts down.
> > 
> > 
> > lujan99 wrote:
> >> 
> >> After some test (and more test) my conclusion:
> >> 
> >> If you don't want to lose any messages I can't use any Listener method,
> >> Listener is ok except when my client shutdown.
> >> then I need to use some Receive with consumer.prefetchSize=0.
> >> 
> >> Is ok?
> >> 
> >> note: I test with java/groovy (jms-api) and don't have this issue.
> >> 
> >> someone is using NMS / C # in production?
> >> what if you have messages in the queue and stops the client?
> >> 
> >> update,  if I want to use:
> >>      connection.ExceptionListener += new ExceptionListener(OnException);
> >> to detect close conection (AMS restart) I can't use
> >> 'consumer.prefetchSize=0.'!
> >> 
> >> 
> >> 
> >> 
> > 
> > 
> 
-- 
Tim Bish
http://fusesource.com
http://timbish.blogspot.com/




Mime
View raw message