[AIX, Linux, Windows]

Apache Qpid JMS message reliability

There are four features of the Apache Qpid™ JMS library that allow you to control the reliability of message delivery to, and from, AMQP applications.

These are for:
  • Publishing/Producer for point to point messaging
    • Message expiration
    • Message persistence
  • Subscribing
    • Subscription durability
    • Session acknowledgment mode (Applicable also for consumer point to point messaging)

Publishing

Message expiration

Setting the time-to-live value of the JMS producer affects the expiry time given to messages published by that message producer.

Ensure that the time-to-live value for a JMS producer is sufficiently large that messages are consumed before they expire.

Alternatively, leaving the time-to-live value unset prevents the message from expiring from the subscription queue.

Message persistence

Setting the delivery mode of the JMS message producer sets the persistence of the IBM® MQ message published to the specified topic.

Ensure that you use DeliveryMode.PERSISTENT for messages that must be retained when a queue manager is ended, or has an outage.

Subscribing

Subscription durability
AMQP channels support the creation of durable subscriptions by using the durable versions of the JMS create consumer methods:
  • createDurableConsumer()
  • createSharedDurableConsumer()

Session acknowledgment mode

To guarantee that a consumed message has been fully processed before it is removed from the IBM MQ subscription queue, create a JMS session using the Session.CLIENT_ACKNOWLEDGE mode and use the message.acknowledge() method to acknowledge this message and any others previously received on this session.