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
public class QueueView extends DestinationView implements 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 Constructor Description QueueView(ManagedRegionBroker broker, Queue destination) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcopyMatchingMessagesTo(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.intcursorSize()booleandoesCursorHaveMessagesBuffered()booleandoesCursorHaveSpace()longgetCursorMemoryUsage()intgetCursorPercentUsage()CompositeDatagetMessage(String messageId)Retrieve a message from the destination's queue.Map<String,String>getMessageGroups()StringgetMessageGroupType()booleanisCacheEnabled()booleanisCursorFull()booleanisPaused()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.voidremoveAllMessageGroups()remove 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 destinationintretryMessages()Retries messages sent to the DLQ- 
Methods inherited from class org.apache.activemq.broker.jmx.DestinationView
browse, browse, browseAsTable, browseAsTable, browseMessages, browseMessages, gc, getAverageBlockedTime, getAverageEnqueueTime, getAverageMessageSize, getBlockedProducerWarningInterval, getBlockedSends, getConsumerCount, getDequeueCount, getDispatchCount, getDuplicateFromStoreCount, getEnqueueCount, getExpiredCount, getForwardCount, getInFlightCount, getMaxAuditDepth, getMaxEnqueueTime, getMaxMessageSize, getMaxPageSize, getMaxProducersToAudit, getMemoryLimit, getMemoryPercentUsage, getMemoryUsageByteCount, getMemoryUsagePortion, getMessagesCached, getMinEnqueueTime, getMinMessageSize, getName, getOptions, getProducerCount, getQueueSize, getSlowConsumerStrategy, getStoreMessageSize, getSubscriptions, getTempUsageLimit, getTempUsagePercentUsage, getTotalBlockedTime, isAlwaysRetroactive, isDLQ, isEnableAudit, isPrioritizedMessages, isProducerFlowControl, isSendDuplicateFromStoreToDLQ, isUseCache, resetStatistics, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessageWithProperties, sendTextMessageWithProperties, setAlwaysRetroactive, setBlockedProducerWarningInterval, setDLQ, setEnableAudit, setMaxAuditDepth, setMaxPageSize, setMaxProducersToAudit, setMemoryLimit, setMemoryUsagePortion, setProducerFlowControl, setTempUsageLimit, setUseCache 
- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface org.apache.activemq.broker.jmx.DestinationViewMBean
browse, browse, browseAsTable, browseAsTable, browseMessages, browseMessages, getAverageBlockedTime, getAverageEnqueueTime, getAverageMessageSize, getBlockedProducerWarningInterval, getBlockedSends, getConsumerCount, getDequeueCount, getDispatchCount, getDuplicateFromStoreCount, getEnqueueCount, getExpiredCount, getForwardCount, getInFlightCount, getMaxAuditDepth, getMaxEnqueueTime, getMaxMessageSize, getMaxPageSize, getMaxProducersToAudit, getMemoryLimit, getMemoryPercentUsage, getMemoryUsageByteCount, getMemoryUsagePortion, getMinEnqueueTime, getMinMessageSize, getName, getOptions, getProducerCount, getQueueSize, getSlowConsumerStrategy, getStoreMessageSize, getSubscriptions, getTempUsageLimit, getTempUsagePercentUsage, getTotalBlockedTime, isAlwaysRetroactive, isDLQ, isPrioritizedMessages, isProducerFlowControl, isSendDuplicateFromStoreToDLQ, isUseCache, resetStatistics, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessage, sendTextMessageWithProperties, sendTextMessageWithProperties, setAlwaysRetroactive, setBlockedProducerWarningInterval, setDLQ, setMaxAuditDepth, setMaxPageSize, setMaxProducersToAudit, setMemoryLimit, setMemoryUsagePortion, setProducerFlowControl, setTempUsageLimit, setUseCache 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
QueueView
public QueueView(ManagedRegionBroker broker, Queue destination)
 
 - 
 
- 
Method Detail
- 
getMessage
public CompositeData getMessage(String messageId) throws OpenDataException
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
public void purge() throws ExceptionDescription copied from interface:QueueViewMBeanRemoves all of the messages in the queue.- Specified by:
 purgein interfaceQueueViewMBean- Throws:
 Exception
 
- 
removeMessage
public boolean removeMessage(String messageId) throws Exception
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
public int removeMatchingMessages(String selector) throws Exception
Description copied from interface:QueueViewMBeanRemoves the messages matching the given selector- Specified by:
 removeMatchingMessagesin interfaceQueueViewMBean- Returns:
 - the number of messages removed
 - Throws:
 Exception
 
- 
removeMatchingMessages
public int removeMatchingMessages(String selector, int maximumMessages) throws Exception
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
public boolean copyMessageTo(String messageId, String destinationName) throws Exception
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
public int copyMatchingMessagesTo(String selector, String destinationName) throws Exception
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
public boolean moveMessageTo(String messageId, String destinationName) throws Exception
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
public int moveMatchingMessagesTo(String selector, String destinationName) throws Exception
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
public int retryMessages() throws ExceptionDescription copied from interface:QueueViewMBeanRetries messages sent to the DLQ- Specified by:
 retryMessagesin interfaceQueueViewMBean- Throws:
 Exception
 
- 
retryMessage
public boolean retryMessage(String messageId) throws Exception
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
public Map<String,String> getMessageGroups()
- Specified by:
 getMessageGroupsin interfaceQueueViewMBean- Returns:
 - a Map of groupNames and ConsumerIds
 
 
- 
getMessageGroupType
public String getMessageGroupType()
- Specified by:
 getMessageGroupTypein interfaceQueueViewMBean- Returns:
 - the message group type implementation (simple,bucket,cached)
 
 
- 
removeMessageGroup
public void removeMessageGroup(String groupName)
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
 
 - 
 
 -