Sun GlassFish Message Queue 4.4 Administration Guide

Managing the Dead Message Queue

The physical destination configuration property useDMQ controls a destination’s use of the dead message queue. Physical destinations are configured to use the dead message queue by default; to disable a destination from using it, set the destination’s useDMQ property to false:

   imqcmd update dst  -t q  -n curlyQueue  -o useDMQ=false

You can enable or disable the use of the dead message queue for all auto-created physical destinations on a broker by setting the broker’s imq.autocreate.destination.useDMQ broker property:

   imqcmd update bkr  -o imq.autocreate.destination.useDMQ=false

You can manage the dead message queue with the Message Queue Command utility (imqcmd) just as you manage other queues, but with some differences. For example, because the dead message queue is system-created, you cannot create, pause, or destroy it. Also, as shown in Table 7–2, default values for the dead message queue’s configuration properties sometimes differ from those of ordinary queues.

Table 7–2 Dead Message Queue Treatment of Physical Destination Properties

Property 

Variant Treatment by Dead Message Queue 

maxNumMsgs

Default value is 1000, rather than -1 (unlimited) as for ordinary queues.

maxTotalMsgBytes

Default value is 10m (10 megabytes), rather than -1 (unlimited) as for ordinary queues.

limitBehavior

Default value is REMOVE_OLDEST, rather than REJECT_NEWEST as for ordinary queues.

FLOW_CONTROL is not supported for the dead message queue.

maxNumProducers

Does not apply to the dead message queue.  

isLocalOnly

Permanently set to false in broker clusters; the dead message queue in a cluster is always a global physical destination.

localDeliveryPreferred

Does not apply to the dead message queue.  


Tip –

By default, the dead message queue stores entire messages. If you do not plan to restore dead messages, you can reduce the size of the dead message queue by setting the broker’s imq.destination.DMQ.truncateBody property to true:

   imqcmd update bkr  -o imq.destination.DMQ.truncateBody=true

This will discard the body of all messages and retain only the headers and property data.