Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Session Acknowledgement Modes  RSS feed

 
Aoife Kavanagh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an application acting containing a number of different JMS Listeners for different services that we offer. I want to make services configurable so that the acknowledgement mode for some services is AUTO_ACKNOWLEDGE while for others it's CLIENT_ACKNOWLEDGE (if certain types of exceptions occur then I'll place message back on queue by calling Session.recover()). This isn't a problem as I use different Sesison objects per service.
However, on my producer side I currently just use a single JMS Session object to create all my queues and JMS Senders. As message acknowledgement is set on the Session I don't want to have to have a different Session object per queue (per Service really). I'm wondering is it enough for producer Session object to be created using AUTO_ACKNOWLEDGE and for my consumer Session objects to be created using the "correct" acknowledgement mode?

That is, it's to me why the JMS Producer needs to also set the acknowledgement code - is it not just enough for the consumer?

Thanks,
Aoife
 
Padma Lalwani
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both the producer and consumer need to know the acknowledgement mode beforehand.

For example if the Producer works with AUTO_ACKNOWLEDGE and consumer is set to be CLIENT_ACKNOWLEDGE, how does the producer know, it has to wait for explicit acknowledgements from consumer?

-Padma
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!