DMQ Configuration
Controls are provided to configure DMQ functionality globally for multiple queues as well as individual queues. These controls are:
Parameter | Scope | Possible Values |
EnableDMQOnAllQueues | Global | Yes, No |
EnableDMQ | Individual Queue | Yes, No, Default |
By default, individual queues have enableDMQ set to True. This allows the administrator to control DMQ configuration for all queues through global flags.
Other DMQ configuration parameters are summarized in the table below:
Parameter | Description |
DMQExpiryTime | The time period that messages would live on DMQ. |
CleanupDMQAtStartup | If set to 'Yes', all DMQ messages would be deleted at server startup. |
Selectively disabling DMQ for a message
If DMQ is enabled for a destination, by default all expired messages are added to DMQ. However, if an application doesn't want to use the DMQ functionality, it can do so by setting properties in the message through various APIs.
Message Expired Notifications
When a message has expired, the server (if configured) publishes a notification in the form of a JMS Text message on a system topic named ADMINISTRATOR_TOPIC. This function can be used to get notification of expired messages. Any application can create a subscriber based on JMS semantics receiving these notifications.
Configuration
Notifications can be configured globally through a flag EnableNotificationOnDeadMessage. If this flag is set to 'true', the server publishes a notification when a message expires. If an application wants to disable this function for specific messages, it can do so through APIs.
Points to Note
Notifications work only if DMQ is configured for the queue. The published Text Message has the following attributes:
- It has the same set of properties as the original message that expired.
- Its body contains (as text) the destination name on which the original message was published. The message is published to the DMQ as a non-persistent message. This feature is discontinued in future releases. New releases fire JMX Notifications when a message expires.