• 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

Why JMS message gets locked after processed.

 
Greenhorn
Posts: 29
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an JMS application, the requirement is like read message from a JMS queue and do some operation,if that operation fails put the message back on queue and process again after some time(like after 5 mins or 10 mins). I have to retry processing the same message say 3 times in an hour time,but what is happening is once I process and put back the message on queue the state of message gets "Locked" so it won't allow to retry after 5 0r 10 mins. Does anybody knows why the message getting locked on queue and how to resolve these kind of issues?

I am closing all open resources like session,transaction etc related to queue connection.

Following is code snippet for reference -

Putting back message on queue -

Receiving message from queue -

Thanks in advance.

Vighnesh.
 
Ranch Hand
Posts: 312
MS IE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please check if your JMS provider has settings for message retention duration. I believe, decreasing this value should remove the message once it is read from the JMSQ.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic