Interface QueueMBean
The QueueMBean is enabled by the wasJmsServer feature.
A QueueMBean is initialized for each Queue defined in the Messaging Engine configuration.
Use the MBean programming interface to query runtime information about a Queue.
JMX clients should use the ObjectName of this MBean to query it
Partial Object Name: WebSphere:feature=wasJmsServer, type=Queue,name=*
where name is unique for each queue and is equal to the name of the queue defined in messaging engine configuration.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Delete all messages on the Queue.void
deleteQueuedMessage
(String messageId, Boolean move) Delete a specific message on the Queue.long
getDepth()
Getter for the depth attribute for the queue.getId()
The ID of the Queue represented by this Messaging Engine.The identifier (name) attribute of the Queue represented by this Messaging Engine.long
Getter for the MaxQueueDepth attribute for the queue.byte[]
getMessageData
(String messageId, Integer size) Get the data content, or payload, of one specific message on the Queue.com.ibm.ws.sib.admin.mxbean.QueuedMessage
getQueuedMessage
(String messageId) Get an object representing one specific message on the Queuecom.ibm.ws.sib.admin.mxbean.QueuedMessageDetail
getQueuedMessageDetail
(String messageId) Get an object containing detailed information on one specific message on the Queue.com.ibm.ws.sib.admin.mxbean.QueuedMessage[]
getQueuedMessages
(Integer fromIndex, Integer toIndex, Integer totalMessages) Get an array of objects representing the messages on the Queue starting from fromIndex to toIndexgetState()
Getter for the state attribute for the queue.boolean
Checks if sendAllowed attribute is set for the Queuecom.ibm.ws.sib.admin.mxbean.QueuedMessage[]
Lists an array of message objects representing the messages on the Queue.
-
Method Details
-
getId
String getId()The ID of the Queue represented by this Messaging Engine.- Returns:
- ID of the Queue
-
getIdentifier
String getIdentifier()The identifier (name) attribute of the Queue represented by this Messaging Engine. by this instance.- Returns:
- Name of the Queue
-
getState
String getState()Getter for the state attribute for the queue.- Returns:
- State of the Queue
-
getDepth
long getDepth()Getter for the depth attribute for the queue.- Returns:
- The number of messages queued to the Queue
-
getMaxQueueDepth
long getMaxQueueDepth()Getter for the MaxQueueDepth attribute for the queue.- Returns:
- The maximum number of messages permitted at the Queue
-
isSendAllowed
boolean isSendAllowed()Checks if sendAllowed attribute is set for the Queue- Returns:
- true if send is allowed on the Queue else false
-
listQueuedMessages
Lists an array of message objects representing the messages on the Queue.- Returns:
- Array of messages queued in the Queue
- Throws:
Exception
-
getQueuedMessage
Get an object representing one specific message on the Queue- Parameters:
messageId
- the ID of the message- Returns:
- Message representing the message id
- Throws:
Exception
-
getQueuedMessageDetail
com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getQueuedMessageDetail(String messageId) throws Exception Get an object containing detailed information on one specific message on the Queue. Exception messages are returned in the server locale.- Parameters:
messageId
-- Returns:
- Message representing the message id
- Throws:
Exception
-
getMessageData
Get the data content, or payload, of one specific message on the Queue.- Parameters:
messageId
- the ID of the messagesize
- the number of bytes to return. If the size is specified as zero, or the size exceeds the length of the data content, then the entire message content is returned.- Returns:
- Byte Array representing the message data (Payload)
- Throws:
Exception
-
deleteQueuedMessage
Delete a specific message on the Queue.- Parameters:
messageId
- the ID of the messagemove
- flag indicating whether the message should be discarded. If false, then the message is physically deleted. If true, the message is moved to the exception destination for this queue, if one exists.- Throws:
Exception
-
deleteAllQueuedMessages
Delete all messages on the Queue.- Parameters:
move
- flag indicating whether the message should be moved to the exception destination or deleted. If true, the message is moved to the exception destination for this queue, if one exists. If false, then the message is physically deleted.- Throws:
Exception
-
getQueuedMessages
com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getQueuedMessages(Integer fromIndex, Integer toIndex, Integer totalMessages) throws Exception Get an array of objects representing the messages on the Queue starting from fromIndex to toIndex- Parameters:
fromIndex
- Starting Index of the total messages retrievedtoIndex
- Last Index of the total messages retrievedtotalMessages
- Total number of messages to be retrieved in single invocation of this method- Returns:
- Array of total number of messages retrieved
- Throws:
Exception
-