com.ibm.websphere.messaging.mbean

Interface TopicMBean


  1. @MXBean
  2. public interface TopicMBean

The TopicMBean is enabled by the wasJmsServer feature. A TopicMBean is initialized for each Topic existing on the messaging engine. Use the MBean programming interface to query runtime information about a Topic.

JMX clients should use the ObjectName of this MBean to query it
Partial Object Name: WebSphere:feature=wasJmsServer, type=Topic,name=*
where name is unique for each Topic and is equal to the name of the Topic.


Method Summary

Modifier and Type Method and Description
  1. void
deleteSubscription(java.lang.String subId)
Delete a subscription
  1. void
deleteSubscriptionMessage(java.lang.String subId,java.lang.String messageId,java.lang.Boolean move)
Delete a specific message on the Subscription.
  1. long
getDepth()
Total number of unique messages on this Topic which are not yet passed to all subscribers
  1. java.lang.String
getId()
The UUID of the Topic represented by this instance.
  1. java.lang.String
getIdentifier()
The identifier (name) attribute of the Topic represented by this instance.
  1. long
getMaxQueueSize()
The maximum number of messages permitted at the Topic
  1. com.ibm.ws.sib.admin.mxbean.MessagingSubscription
getSubscription(java.lang.String subId)
Get an object representing a specified Subscription
  1. com.ibm.ws.sib.admin.mxbean.MessagingSubscription
getSubscriptionByName(java.lang.String subName)
Get an object representing a specified Subscription
  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage
getSubscriptionMessage(java.lang.String subId,java.lang.String messageId)
Get a message object representing one specific message on a specified Subscription.
  1. byte[]
getSubscriptionMessageData(java.lang.String subId,java.lang.String messageId,java.lang.Integer size)
Get the data content, or payload, of one specific message on the Subscription.
  1. com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail
getSubscriptionMessageDetail(java.lang.String subId,java.lang.String messageId)
Get a message object containing detailed information on one specific message on a specified Subscription.
  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage[]
getSubscriptionMessages(java.lang.String subId)
Get an array of message objects representing the messages on a specified Subscription.
  1. boolean
isSendAllowed()
Can producers send to this Topic?
  1. com.ibm.ws.sib.admin.mxbean.MessagingSubscription[]
listSubscriptions()
List an array of objects representing all Subscriptions at this Topic

Method Detail

getId

  1. java.lang.String getId()
The UUID of the Topic represented by this instance.
Returns:
ID of the Topic

getIdentifier

  1. java.lang.String getIdentifier( )
The identifier (name) attribute of the Topic represented by this instance.
Returns:
Name of the Topic

getMaxQueueSize

  1. long getMaxQueueSize()
The maximum number of messages permitted at the Topic
Returns:
Maximum number of messages permitted for the Topic

isSendAllowed

  1. boolean isSendAllowed()
Can producers send to this Topic?
Returns:
true if send is allowed on the Topic else false

getDepth

  1. long getDepth()
Total number of unique messages on this Topic which are not yet passed to all subscribers
Returns:
Number of messages present on the Topic

listSubscriptions

  1. com.ibm.ws.sib.admin.mxbean.MessagingSubscription[] listSubscriptions( )
  2. throws java.lang.Exception
List an array of objects representing all Subscriptions at this Topic
Returns:
Array of Subscriptions for the Topic
Throws:
java.lang.Exception

getSubscription

  1. com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscription( java.lang.String subId)
  2. throws java.lang.Exception
Get an object representing a specified Subscription
Parameters:
subId - the ID of the subscription
Returns:
Subscription represented by the Subscription ID
Throws:
java.lang.Exception

getSubscriptionByName

  1. com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscriptionByName( java.lang.String subName)
  2. throws java.lang.Exception
Get an object representing a specified Subscription
Parameters:
subName - the name of the subscription( name is represented as clientId##subscription name)
Returns:
Subscription represented by the Subscription name
Throws:
java.lang.Exception

deleteSubscription

  1. void deleteSubscription(java.lang.String subId)
  2. throws java.lang.Exception
Delete a subscription
Parameters:
subId -
Throws:
com.ibm.ws.sib.admin.exception.InvalidArgumentException
com.ibm.ws.sib.admin.exception.ControllableNotFoundException
com.ibm.ws.sib.admin.exception.RuntimeOperationFailedException
java.lang.Exception

getSubscriptionMessages

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getSubscriptionMessages( java.lang.String subId)
  2. throws java.lang.Exception
Get an array of message objects representing the messages on a specified Subscription.
Returns:
Array of messages ready to be subscribed by the Subscription representing Subscription ID
Throws:
java.lang.Exception

getSubscriptionMessage

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessage getSubscriptionMessage( java.lang.String subId,
  2. java.lang.String messageId)
  3. throws java.lang.Exception
Get a message object representing one specific message on a specified Subscription.
Parameters:
subId - the ID of the subscription
messageId - the ID of the message
Returns:
Message representing the Message ID and ready to be consumed by Subscription representing Subscription ID
Throws:
java.lang.Exception

getSubscriptionMessageDetail

  1. com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getSubscriptionMessageDetail( java.lang.String subId,
  2. java.lang.String messageId)
  3. throws java.lang.Exception
Get a message object containing detailed information on one specific message on a specified Subscription.
Parameters:
subId - the ID of the subscription
messageId - the ID of the message
Returns:
Message representing the Message ID and ready to be consumed by Subscription representing Subscription ID
Throws:
java.lang.Exception

getSubscriptionMessageData

  1. byte[] getSubscriptionMessageData( java.lang.String subId,
  2. java.lang.String messageId,
  3. java.lang.Integer size)
  4. throws java.lang.Exception
Get the data content, or payload, of one specific message on the Subscription.
Parameters:
subId - the ID of the subscription
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 Payload
Throws:
java.lang.Exception

deleteSubscriptionMessage

  1. void deleteSubscriptionMessage( java.lang.String subId,
  2. java.lang.String messageId,
  3. java.lang.Boolean move)
  4. throws java.lang.Exception
Delete a specific message on the Subscription.
Parameters:
subId - the ID of the subscription
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:
java.lang.Exception