aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Question about acknowledge Mode in JMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Question about acknowledge Mode in JMS" Watch "Question about acknowledge Mode in JMS" New topic
Author

Question about acknowledge Mode in JMS

avseq anthoy
Ranch Hand

Joined: Apr 27, 2004
Posts: 104
Dear all


In JMS Specification, The default acknowledge mode is AUTO_ACKNOWLEDGE.
The explanation as below

AUTO_ACKNOWLEDGE - With this option, the session automatically
acknowledges a client’s receipt of a message when it has either successfully
returned from a call to receive or the MessageListener it has called to process
the message successfully returns.


It means that when receiver calls to receive or onMessage in MessageListener process successfully ,
it will return a acknowledge to middleware to imply it receive message successfully.
The definition is only for receiver.

For the sender,
I want to understand that does the middleware send the acknowledge to sender when it receive the message
from sender successfully?
The JMS specification didn't mention it . But I seem to see some information about this(But I can't find it again)

Can someone explain the question to me?

Thanks
Best Regards


My Way,My Pace
Ram Narayan.M
Ranch Hand

Joined: Jul 11, 2010
Posts: 247

The acknowledgement message will be sent to JMS Service which sends the message to the receiver... So the end client sending the message does not know if the message has been delivered successfully to the receiver... All managed by JMS Service


SCJP 6 [SCJP - Old is Gold]
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

If we have access to the server , can we see this Acknowledged Message ??

If so please specify the location , i am using weblogic 11 RI as my server .


Save India From Corruption - Anna Hazare.
Ran Pleasant
Ranch Hand

Joined: Jan 16, 2003
Posts: 75
Ravi Kiran V wrote:If we have access to the server , can we see this Acknowledged Message ??

If so please specify the location , i am using weblogic 11 RI as my server .



Do you have a real need to see it? Think of the acknowledgement as similar to a transaction commit, all it is doing is letting the JMS system know that you did in fact receive the message so that it can stop trying to send the message to you. If for some reason it does not receive an acknowledgement then it will try to send the message again. My understanding is that the acknowledgement is not stored by JMS since it has no value once it is received and the message of out of the topic/queue.


Ran
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Thanks Ran , it was very informative .
 
jQuery in Action, 2nd edition
 
subject: Question about acknowledge Mode in JMS