• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
Why am I so drawn to cherry pie? I can't seem to stop. Save me tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic