Skip to Main Content
Java Message Service
book

Java Message Service

by David A Chappell, Richard Monson-Haefel
December 2000
Intermediate to advanced content levelIntermediate to advanced
240 pages
6h 9m
English
O'Reilly Media, Inc.
Content preview from Java Message Service

Name

JMSRedelivered — Purpose: Routing

Synopsis

The JMSRedelivered header indicates if the message was redelivered to the consumer. The JMSRedelivered header is true if the message has been redelivered, and false if has not. A message may be marked as redelivered if a consumer failed to acknowledge delivery, or if the JMS provider is otherwise uncertain whether the consumer received the message.

When a message is delivered to a consumer, the consumer must acknowledge receipt of the message. If it doesn’t, the message server may attempt to redeliver the message. Consumers can acknowledge messages automatically or manually, depending on how the consumer was created. A consumer created with an acknowledgment mode of AUTO_ACKNOWLEDGE or DUPS_OK_ACKNOWLEDGE automatically informs the message server that the message was received. When the consumer is created with CLIENT_ACKNOWLEDGE mode, the JMS client must manually acknowledge the messages.

In general, when a message has a JMSRedelivered value of false, the consumer should assume that there is no chance it has seen this message before. If the redelivered flag is true, the client may have been given this message before so it may need to take some precautions it would not otherwise take. Redelivery can occur under a variety of conditions, and a JMS provider may mark a message as redelivered when it’s in doubt due to failures, error conditions, and other anomalous conditions.

Message acknowledgment and redelivery are covered in detail ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Spring Boot 2.0

Mastering Spring Boot 2.0

Dinesh Rajput
Cloud Native Java

Cloud Native Java

Josh Long, Kenny Bastani

Publisher Resources

ISBN: 0596000685Supplemental ContentErrata Page