File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AUTO_ACKNOWLEGE still may deliver same message twice

 
Sam Gehouse
Ranch Hand
Posts: 281
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it does Sam. However it might not be always possible and sometimes the same message could be redelivered. With AUTO_ACKNOWLEGE mode for example, there is a small gap between the time the message was received and the moment of acknowledgement. If the application fails exactly within that gap, then because the message was delivered, but the acknowledge message wasn�t received (and therefore the message is not removed from the queue) it will be received again next time.
Regards.

--------------------

I think, therefore I exist -- Rene Descartes
Posts: 171 | Registered: Feb 2005 | IP: Logged
Sam Gehouse
ranch hand
Member # 53366

posted April 07, 2005 09:35 AM Profile for Sam Gehouse Email Sam Gehouse Send New Private Message Edit/Delete Post Reply With Quote As you said:
If the application fails exactly within that gap, then because the message was delivered, but the acknowledge message wasn�t received (and therefore the message is not removed from the queue) it will be received again next time.

Is there a solution to that?
In other words, what could be the preferred solution so that the message is NOT delivered MORE than ONCE and ONE TIME ONLY.
Regards,
SG
 
Valentin Tanase
Ranch Hand
Posts: 704
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One obvious solution would be to use another acknowledge mode, like DUPS_OK_ACKNOWLEDGE. Another solution would be to use transacted sessions, which will ignore the acknowledge modes and will help developers to define units of work (transactions). Finally one must use appropriate try/catch blocks in order to avoid application failures.
Regards.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic