Interface QueueMBean


@MXBean public 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 Type
    Method
    Description
    void
    Delete all messages on the Queue.
    void
    Delete a specific message on the Queue.
    long
    Getter for the depth attribute for the queue.
    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
    Get an object representing one specific message on the Queue
    com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail
    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 toIndex
    Getter for the state attribute for the queue.
    boolean
    Checks if sendAllowed attribute is set for the Queue
    com.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

      com.ibm.ws.sib.admin.mxbean.QueuedMessage[] listQueuedMessages() throws Exception
      Lists an array of message objects representing the messages on the Queue.
      Returns:
      Array of messages queued in the Queue
      Throws:
      Exception
    • getQueuedMessage

      com.ibm.ws.sib.admin.mxbean.QueuedMessage getQueuedMessage(String messageId) throws Exception
      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

      byte[] getMessageData(String messageId, Integer size) throws Exception
      Get the data content, or payload, of one specific message on the Queue.
      Parameters:
      messageId - the ID of the message
      size - 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

      void deleteQueuedMessage(String messageId, Boolean move) throws Exception
      Delete a specific message on the Queue.
      Parameters:
      messageId - the ID of the message
      move - 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

      void deleteAllQueuedMessages(Boolean move) throws Exception
      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 retrieved
      toIndex - Last Index of the total messages retrieved
      totalMessages - Total number of messages to be retrieved in single invocation of this method
      Returns:
      Array of total number of messages retrieved
      Throws:
      Exception