Show Table of Contents
9.3.11. Destination MBeans
This section describes the destination MBeans used in the
jbossmq-destinations-service.xml and jbossmq-service.xml descriptors.
9.3.11.1. org.jboss.mq.server.jmx.Queue
The
Queue is used to define a queue destination in JBoss. The following shows the configuration of one of the default JBoss queues.
<mbean code="org.jboss.mq.server.jmx.Queue"
name="jboss.mq.destination:service=Queue,name=testQueue">
<depends optional-attribute-name="DestinationManager">
jboss.mq:service=DestinationManager
</depends>
<depends optional-attribute-name="SecurityManager">
jboss.mq:service=SecurityManager
</depends>
<attribute name="MessageCounterHistoryDayLimit">-1</attribute>
<attribute name="SecurityConf">
<security>
<role name="guest" read="true" write="true"/>
<role name="publisher" read="true" write="true" create="false"/>
<role name="noacc" read="false" write="false" create="false"/>
</security>
</attribute>
</mbean>
The
name attribute of the JMX object name of this MBean is used to determine the destination name. For example. In the case of the queue we just looked at, the name of the queue is testQueue. The configurable attributes are as follows:
- DestinationManager: The JMX ObjectName of the destination manager service for the server. This attribute should be set via a
<depends optional-attribute-name="DestinationManager">XML tag. - SecurityManager: The JMX
ObjectNameof the security manager service that is being used to validate client requests. - SecurityConf: This element specifies a XML fragment which describes the access control list to be used by the
SecurityManagerto authorize client operations against the destination. The content model is the same as for theSecurityManagerSecurityConfattribute. - JNDIName: The location in JNDI to which the queue object will be bound. If this is not set it will be bound under the
queuecontext using the name of the queue. For thetestQueueshown above, the JNDI name would bequeue/testQueue. - MaxDepth: The
MaxDepthis an upper limit to the backlog of messages that can exist for a destination. If exceeded, attempts to add new messages will result in aorg.jboss.mq.DestinationFullException. TheMaxDepthcan still be exceeded in a number of situations, e.g. when a message is placed back into the queue. Also transactions performing read committed processing, look at the current size of queue, ignoring any messages that may be added as a result of the current transaction or other transactions. This is because we don't want the transaction to fail during the commit phase when the message is physically added to the queue. - MessageCounterHistoryDayLimit: Sets the destination message counter history day limit with a value less than 0 indicating unlimited history, a 0 value disabling history and a value greater than 0 giving the history days count.
Additional read-only attributes that provide statistics information include:
- MessageCounter: An array of
org.jboss.mq.server.MessageCounterinstances that provide statistics for this destination. - QueueDepth: The current backlog of waiting messages.
- ReceiversCount: The number of receivers currently associated with the queue.
- ScheduledMessageCount: The number of messages waiting in the queue for their scheduled delivery time to arrive.
The following are some of the operations available on queues.
- listMessageCounter(): This operation generates an HTML table that contains the same data we as the
listMessageCounteroperation on theDestinationManager, but only for this one queue. - resetMessageCounter(): This zeros all destination counts and last added times.
- listMessageCounterHistory(): This operation display an HTML table showing the hourly message counts per hour for each day in the history.
- resetMessageCounterHistory(): This operation resets the day history message counts.
- removeAllMessages(): This method removes all the messages on the queue.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.