• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Session Acknowledgement Modes

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic