JMS Message Delivery Modes

Overview of delivery modes for JMS message.

The delivery mode for a JMS message is specified by the sender and instructs the server concerning persistent storage for the message. The JMSDeliveryMode message header field defines the delivery mode for the message.

JMS supports PERSISTENT and NON_PERSISTENT delivery modes for both topic and queue. TIBCO Enterprise Message Service extends these delivery modes to include a RELIABLE delivery mode.

To set the delivery mode for the JMS message, add the following configuration property in the ASG_CONFIG_HOME/asg.properties file:

tibco.clientVar.ASG/SharedResources/JMS/deliveryMode=delivery_mode_number

where delivery_mode_number is one of the numbers that represent a delivery mode, as shown in JMS Message Delivery Modes table.

For example, if you want to set the delivery mode as PERSISTENT, add the property as follows:

tibco.clientVar.ASG/SharedResources/JMS/deliveryMode=2

JMS Message Delivery Modes
No. Mode Description
1 NON_PERSISTENT
    The message is not persisted on the disk or database by the server, so you lose the in-transit message when the server is restarted.
2 PERSISTENT
   
  • Ensures the delivery of messages to the destination on the server in almost all circumstances. This is applicable when a producer sends a PERSISTENT message when waiting for the server to reply with a confirmation. The message is persisted on the disk by the server.
  • This is the default value.
22 RELIABLE
   
  • TIBCO Proprietary
  • This value is an extension of the JMS standard delivery modes.
  • Defines the reliable delivery mode and is used only in TIBCO Enterprise Message Service.
  • When this delivery mode is used, it offers increased performance of the message producers.
Note:
  • JMS providers such as IBM WebSphere MQ support the standard delivery modes (1 interpreted as NON_PERSISTENT and 2 interpreted as PERSISTENT), but, do not support the delivery mode 22 interpreted as RELIABLE.
  • TIBCO Enterprise Message Service supports the standard delivery modes (1 interpreted as NON_PERSISTENT, 2 interpreted as PERSISTENT) and the extended mode 22 interpreted as RELIABLE.
  • Persistent messaging is usually slower than non-persistent delivery.