Message Acknowledgement Modes:
The JMS specification defines three levels of
acknowledgement for non-transacted sessions:
• Client: The
message will be acknowledged when the process implementing the operation ends
successfully. The session is locked.
Auto: The message is automatically
acknowledged when it is received.
DUPS_OK_ACKNOWLEDGE specifies that the session is
to "lazily" acknowledge the delivery of messages to the consumer.
"Lazy" means that the consumer can delay acknowledgement of messages
to the server until a convenient time; meanwhile the server might redeliver messages. This mode
reduces session overhead. Should JMS fail, the consumer may receive duplicate
messages.
EMS extends the JMS acknowledge modes to include:
• NO_ACKNOWLEDGE
• EXPLICIT_CLIENT_ACKNOWLEDGE
• EXPLICIT_CLIENT_DUPS_OK_ACKNOWLEDGE
NO_ACKNOWLEDGE:NO_ACKNOWLEDGE mode suppresses the acknowledgement of
received messages. After the server sends a message to the client, all
information regarding that message for that consumer is eliminated from the
server. Therefore, there is no need for the client application to send an
acknowledgement to the server about the received message. Not sending
acknowledgements decreases the message traffic and saves time for the
receiver, therefore allowing better utilization of system resources.
Note: 1.Sessions created in no-acknowledge receipt mode cannot
be used to create durable subscribers.
2. Also, queue receivers on a queue that is routed from
another server are not permitted to specify NO_ACKNOWLEDGE mode.
TIBCO EMS Explicit Client Acknowledge: this mode behaves exactly the same as the Client mode, except the
session is not locked and one session can handle all the incoming messages.
No comments:
Post a Comment