Interface TopicMBean
-
@MXBean public interface TopicMBeanThe 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteSubscription(java.lang.String subId)Delete a subscriptionvoiddeleteSubscriptionMessage(java.lang.String subId, java.lang.String messageId, java.lang.Boolean move)Delete a specific message on the Subscription.longgetDepth()Total number of unique messages on this Topic which are not yet passed to all subscribersjava.lang.StringgetId()The UUID of the Topic represented by this instance.java.lang.StringgetIdentifier()The identifier (name) attribute of the Topic represented by this instance.longgetMaxQueueSize()The maximum number of messages permitted at the Topiccom.ibm.ws.sib.admin.mxbean.MessagingSubscriptiongetSubscription(java.lang.String subId)Get an object representing a specified Subscriptioncom.ibm.ws.sib.admin.mxbean.MessagingSubscriptiongetSubscriptionByName(java.lang.String subName)Get an object representing a specified Subscriptioncom.ibm.ws.sib.admin.mxbean.QueuedMessagegetSubscriptionMessage(java.lang.String subId, java.lang.String messageId)Get a message object representing one specific message on a specified Subscription.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.com.ibm.ws.sib.admin.mxbean.QueuedMessageDetailgetSubscriptionMessageDetail(java.lang.String subId, java.lang.String messageId)Get a message object containing detailed information on one specific message on a specified Subscription.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.booleanisSendAllowed()Can producers send to this Topic?com.ibm.ws.sib.admin.mxbean.MessagingSubscription[]listSubscriptions()List an array of objects representing all Subscriptions at this Topic
-
-
-
Method Detail
-
getId
java.lang.String getId()
The UUID of the Topic represented by this instance.- Returns:
- ID of the Topic
-
getIdentifier
java.lang.String getIdentifier()
The identifier (name) attribute of the Topic represented by this instance.- Returns:
- Name of the Topic
-
getMaxQueueSize
long getMaxQueueSize()
The maximum number of messages permitted at the Topic- Returns:
- Maximum number of messages permitted for the Topic
-
isSendAllowed
boolean isSendAllowed()
Can producers send to this Topic?- Returns:
- true if send is allowed on the Topic else false
-
getDepth
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
com.ibm.ws.sib.admin.mxbean.MessagingSubscription[] listSubscriptions() throws java.lang.ExceptionList an array of objects representing all Subscriptions at this Topic- Returns:
- Array of Subscriptions for the Topic
- Throws:
java.lang.Exception
-
getSubscription
com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscription(java.lang.String subId) throws java.lang.ExceptionGet 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
com.ibm.ws.sib.admin.mxbean.MessagingSubscription getSubscriptionByName(java.lang.String subName) throws java.lang.ExceptionGet 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
void deleteSubscription(java.lang.String subId) throws java.lang.ExceptionDelete a subscription- Parameters:
subId-- Throws:
com.ibm.ws.sib.admin.exception.InvalidArgumentExceptioncom.ibm.ws.sib.admin.exception.ControllableNotFoundExceptioncom.ibm.ws.sib.admin.exception.RuntimeOperationFailedExceptionjava.lang.Exception
-
getSubscriptionMessages
com.ibm.ws.sib.admin.mxbean.QueuedMessage[] getSubscriptionMessages(java.lang.String subId) throws java.lang.ExceptionGet 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
com.ibm.ws.sib.admin.mxbean.QueuedMessage getSubscriptionMessage(java.lang.String subId, java.lang.String messageId) throws java.lang.ExceptionGet a message object representing one specific message on a specified Subscription.- Parameters:
subId- the ID of the subscriptionmessageId- 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
com.ibm.ws.sib.admin.mxbean.QueuedMessageDetail getSubscriptionMessageDetail(java.lang.String subId, java.lang.String messageId) throws java.lang.ExceptionGet a message object containing detailed information on one specific message on a specified Subscription.- Parameters:
subId- the ID of the subscriptionmessageId- 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
byte[] getSubscriptionMessageData(java.lang.String subId, java.lang.String messageId, java.lang.Integer size) throws java.lang.ExceptionGet the data content, or payload, of one specific message on the Subscription.- Parameters:
subId- the ID of the subscriptionmessageId- 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 Payload
- Throws:
java.lang.Exception
-
deleteSubscriptionMessage
void deleteSubscriptionMessage(java.lang.String subId, java.lang.String messageId, java.lang.Boolean move) throws java.lang.ExceptionDelete a specific message on the Subscription.- Parameters:
subId- the ID of the subscriptionmessageId- 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:
java.lang.Exception
-
-