Package org.apache.activemq.broker.jmx
Class QueueView
java.lang.Object
org.apache.activemq.broker.jmx.DestinationView
org.apache.activemq.broker.jmx.QueueView
- All Implemented Interfaces:
DestinationViewMBean,QueueViewMBean
Provides a JMX Management view of a Queue.
-
Field Summary
Fields inherited from class org.apache.activemq.broker.jmx.DestinationView
broker, destination -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcopyMatchingMessagesTo(String selector, String destinationName) Copies the messages matching the given selectorintcopyMatchingMessagesTo(String selector, String destinationName, int maximumMessages) Copies the messages matching the given selector up to the maximum number of matched messagesbooleancopyMessageTo(String messageId, String destinationName) Copies a given message to another destination.intbooleanbooleanlongintgetMessage(String messageId) Retrieve a message from the destination's queue.booleanbooleanbooleanisPaused()intmoveMatchingMessagesTo(String selector, String destinationName) Moves the messages matching the given selectorintmoveMatchingMessagesTo(String selector, String destinationName, int maximumMessages) Moves the messages matching the given selector up to the maximum number of matched messagesbooleanmoveMessageTo(String messageId, String destinationName) Moves the message to another destination.voidpause()voidpurge()Removes all of the messages in the queue.voidremove all the message groups - will rebalance all message groups across consumersintremoveMatchingMessages(String selector) Removes the messages matching the given selectorintremoveMatchingMessages(String selector, int maximumMessages) Removes the messages matching the given selector up to the maximum number of matched messagesbooleanremoveMessage(String messageId) Removes a message from the queue.voidremoveMessageGroup(String groupName) remove a message group = has the effect of rebalancing groupvoidresume()booleanretryMessage(String messageId) Moves a message back to its original destinationintRetries messages sent to the DLQMethods inherited from class org.apache.activemq.broker.jmx.DestinationView
browse, browse, browseAsTable, browseAsTable, browseMessages, browseMessages, gc, getAverageBlockedTime, getAverageEnqueueTime, getAverageMessageSize, getBlockedProducerWarningInterval, getBlockedSends, getConsumerCount, getDequeueCount, getDequeuedMessageBrokerInTime, getDequeuedMessageBrokerOutTime, getDequeuedMessageClientId, getDequeuedMessageId, getDequeuedMessageTimestamp, getDispatchCount, getDuplicateFromStoreCount, getEnqueueCount, getEnqueuedMessageBrokerInTime, getEnqueuedMessageClientId, getEnqueuedMessageId, getEnqueuedMessageTimestamp, getExpiredCount, getForwardCount, getInFlightCount, getMaxAuditDepth, getMaxEnqueueTime, getMaxMessageSize, getMaxPageSize, getMaxProducersToAudit, getMaxUncommittedExceededCount, getMemoryLimit, getMemoryPercentUsage, getMemoryUsageByteCount, getMemoryUsagePortion, getMessagesCached, getMinEnqueueTime, getMinMessageSize, getName, getNetworkDequeues, getNetworkEnqueues, getOptions, getProducerCount, getQueueSize, getSlowConsumerStrategy, getStoreMessageSize, getSubscriptions, getTempUsageLimit, getTempUsagePercentUsage, getTotalBlockedTime, isAdvancedMessageStatisticsEnabled, isAdvancedNetworkStatisticsEnabled, isAlwaysRetroactive, isDLQ, isEnableAudit, isPrioritizedMessages, isProducerFlowControl, isSendDuplicateFromStoreToDLQ, isUseCache, resetStatistics, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessageWithProperties, sendTextMessageWithProperties, setAdvancedMessageStatisticsEnabled, setAdvancedNetworkStatisticsEnabled, setAlwaysRetroactive, setBlockedProducerWarningInterval, setDLQ, setEnableAudit, setMaxAuditDepth, setMaxPageSize, setMaxProducersToAudit, setMemoryLimit, setMemoryUsagePortion, setProducerFlowControl, setTempUsageLimit, setUseCacheMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.activemq.broker.jmx.DestinationViewMBean
browse, browse, browseAsTable, browseAsTable, browseMessages, browseMessages, getAverageBlockedTime, getAverageEnqueueTime, getAverageMessageSize, getBlockedProducerWarningInterval, getBlockedSends, getConsumerCount, getDequeueCount, getDequeuedMessageBrokerInTime, getDequeuedMessageBrokerOutTime, getDequeuedMessageClientId, getDequeuedMessageId, getDequeuedMessageTimestamp, getDispatchCount, getDuplicateFromStoreCount, getEnqueueCount, getEnqueuedMessageBrokerInTime, getEnqueuedMessageClientId, getEnqueuedMessageId, getEnqueuedMessageTimestamp, getExpiredCount, getForwardCount, getInFlightCount, getMaxAuditDepth, getMaxEnqueueTime, getMaxMessageSize, getMaxPageSize, getMaxProducersToAudit, getMaxUncommittedExceededCount, getMemoryLimit, getMemoryPercentUsage, getMemoryUsageByteCount, getMemoryUsagePortion, getMinEnqueueTime, getMinMessageSize, getName, getNetworkDequeues, getNetworkEnqueues, getOptions, getProducerCount, getQueueSize, getSlowConsumerStrategy, getStoreMessageSize, getSubscriptions, getTempUsageLimit, getTempUsagePercentUsage, getTotalBlockedTime, isAdvancedMessageStatisticsEnabled, isAdvancedNetworkStatisticsEnabled, isAlwaysRetroactive, isDLQ, isPrioritizedMessages, isProducerFlowControl, isSendDuplicateFromStoreToDLQ, isUseCache, resetStatistics, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessageWithProperties, sendTextMessageWithProperties, setAdvancedMessageStatisticsEnabled, setAdvancedNetworkStatisticsEnabled, setAlwaysRetroactive, setBlockedProducerWarningInterval, setDLQ, setMaxAuditDepth, setMaxPageSize, setMaxProducersToAudit, setMemoryLimit, setMemoryUsagePortion, setProducerFlowControl, setTempUsageLimit, setUseCache
-
Constructor Details
-
QueueView
-
-
Method Details
-
getMessage
Description copied from interface:QueueViewMBeanRetrieve a message from the destination's queue.- Specified by:
getMessagein interfaceQueueViewMBean- Parameters:
messageId- the message id of the message to retrieve- Returns:
- A CompositeData object which is a JMX version of the messages
- Throws:
OpenDataException
-
purge
Description copied from interface:QueueViewMBeanRemoves all of the messages in the queue.- Specified by:
purgein interfaceQueueViewMBean- Throws:
Exception
-
removeMessage
Description copied from interface:QueueViewMBeanRemoves a message from the queue. If the message has already been dispatched to another consumer, the message cannot be deleted and this method will return false.- Specified by:
removeMessagein interfaceQueueViewMBean- Returns:
- true if the message was found and could be successfully deleted.
- Throws:
Exception
-
removeMatchingMessages
Description copied from interface:QueueViewMBeanRemoves the messages matching the given selector- Specified by:
removeMatchingMessagesin interfaceQueueViewMBean- Returns:
- the number of messages removed
- Throws:
Exception
-
removeMatchingMessages
Description copied from interface:QueueViewMBeanRemoves the messages matching the given selector up to the maximum number of matched messages- Specified by:
removeMatchingMessagesin interfaceQueueViewMBean- Returns:
- the number of messages removed
- Throws:
Exception
-
copyMessageTo
Description copied from interface:QueueViewMBeanCopies a given message to another destination.- Specified by:
copyMessageToin interfaceQueueViewMBean- Returns:
- true if the message was found and was successfully copied to the other destination.
- Throws:
Exception
-
copyMatchingMessagesTo
Description copied from interface:QueueViewMBeanCopies the messages matching the given selector- Specified by:
copyMatchingMessagesToin interfaceQueueViewMBean- Returns:
- the number of messages copied
- Throws:
Exception
-
copyMatchingMessagesTo
public int copyMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception Description copied from interface:QueueViewMBeanCopies the messages matching the given selector up to the maximum number of matched messages- Specified by:
copyMatchingMessagesToin interfaceQueueViewMBean- Returns:
- the number of messages copied
- Throws:
Exception
-
moveMessageTo
Description copied from interface:QueueViewMBeanMoves the message to another destination.- Specified by:
moveMessageToin interfaceQueueViewMBean- Returns:
- true if the message was found and was successfully copied to the other destination.
- Throws:
Exception
-
moveMatchingMessagesTo
Description copied from interface:QueueViewMBeanMoves the messages matching the given selector- Specified by:
moveMatchingMessagesToin interfaceQueueViewMBean- Returns:
- the number of messages removed
- Throws:
Exception
-
moveMatchingMessagesTo
public int moveMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception Description copied from interface:QueueViewMBeanMoves the messages matching the given selector up to the maximum number of matched messages- Specified by:
moveMatchingMessagesToin interfaceQueueViewMBean- Throws:
Exception
-
retryMessages
Description copied from interface:QueueViewMBeanRetries messages sent to the DLQ- Specified by:
retryMessagesin interfaceQueueViewMBean- Throws:
Exception
-
retryMessage
Moves a message back to its original destination- Specified by:
retryMessagein interfaceQueueViewMBean- Throws:
Exception
-
cursorSize
public int cursorSize()- Specified by:
cursorSizein interfaceQueueViewMBean- Returns:
- the number of messages available to be paged in by the cursor
-
doesCursorHaveMessagesBuffered
public boolean doesCursorHaveMessagesBuffered()- Specified by:
doesCursorHaveMessagesBufferedin interfaceQueueViewMBean- Returns:
- true if the cursor has messages buffered to deliver
-
doesCursorHaveSpace
public boolean doesCursorHaveSpace()- Specified by:
doesCursorHaveSpacein interfaceQueueViewMBean- Returns:
- true if the message cursor has memory space available to page in more messages
-
getCursorMemoryUsage
public long getCursorMemoryUsage()- Specified by:
getCursorMemoryUsagein interfaceQueueViewMBean- Returns:
- the cursor memory usage in bytes
-
getCursorPercentUsage
public int getCursorPercentUsage()- Specified by:
getCursorPercentUsagein interfaceQueueViewMBean- Returns:
- the cursor memory usage as a percentage
-
isCursorFull
public boolean isCursorFull()- Specified by:
isCursorFullin interfaceQueueViewMBean- Returns:
- true if the cursor has reached its memory limit for paged in messages
-
isCacheEnabled
public boolean isCacheEnabled()- Specified by:
isCacheEnabledin interfaceQueueViewMBean- Returns:
- true if caching is currently enabled of for the destination
-
getMessageGroups
- Specified by:
getMessageGroupsin interfaceQueueViewMBean- Returns:
- a Map of groupNames and ConsumerIds
-
getMessageGroupType
- Specified by:
getMessageGroupTypein interfaceQueueViewMBean- Returns:
- the message group type implementation (simple,bucket,cached)
-
removeMessageGroup
remove a message group = has the effect of rebalancing group- Specified by:
removeMessageGroupin interfaceQueueViewMBean
-
removeAllMessageGroups
public void removeAllMessageGroups()remove all the message groups - will rebalance all message groups across consumers- Specified by:
removeAllMessageGroupsin interfaceQueueViewMBean
-
pause
public void pause()- Specified by:
pausein interfaceQueueViewMBean
-
resume
public void resume()- Specified by:
resumein interfaceQueueViewMBean
-
isPaused
public boolean isPaused()- Specified by:
isPausedin interfaceQueueViewMBean
-