Package org.apache.activemq.broker.jmx
Interface QueueViewMBean
-
- All Superinterfaces:
DestinationViewMBean
- All Known Implementing Classes:
QueueView
public interface QueueViewMBean extends DestinationViewMBean
-
-
Method Summary
All Methods Instance Methods Abstract 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 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
-
-
-
-
Method Detail
-
getMessage
CompositeData getMessage(String messageId) throws OpenDataException
Retrieve a message from the destination's queue.- Parameters:
messageId- the message id of the message to retrieve- Returns:
- A CompositeData object which is a JMX version of the messages
- Throws:
OpenDataException
-
removeMessage
boolean removeMessage(String messageId) throws Exception
Removes 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.- Parameters:
messageId-- Returns:
- true if the message was found and could be successfully deleted.
- Throws:
Exception
-
removeMatchingMessages
int removeMatchingMessages(String selector) throws Exception
Removes the messages matching the given selector- Returns:
- the number of messages removed
- Throws:
Exception
-
removeMatchingMessages
int removeMatchingMessages(String selector, int maximumMessages) throws Exception
Removes the messages matching the given selector up to the maximum number of matched messages- Returns:
- the number of messages removed
- Throws:
Exception
-
copyMessageTo
boolean copyMessageTo(String messageId, String destinationName) throws Exception
Copies a given message to another destination.- Parameters:
messageId-destinationName-- Returns:
- true if the message was found and was successfully copied to the other destination.
- Throws:
Exception
-
copyMatchingMessagesTo
int copyMatchingMessagesTo(String selector, String destinationName) throws Exception
Copies the messages matching the given selector- Returns:
- the number of messages copied
- Throws:
Exception
-
copyMatchingMessagesTo
int copyMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception
Copies the messages matching the given selector up to the maximum number of matched messages- Returns:
- the number of messages copied
- Throws:
Exception
-
moveMessageTo
boolean moveMessageTo(String messageId, String destinationName) throws Exception
Moves the message to another destination.- Parameters:
messageId-destinationName-- Returns:
- true if the message was found and was successfully copied to the other destination.
- Throws:
Exception
-
retryMessage
boolean retryMessage(String messageId) throws Exception
Moves a message back to its original destination- Throws:
Exception
-
moveMatchingMessagesTo
int moveMatchingMessagesTo(String selector, String destinationName) throws Exception
Moves the messages matching the given selector- Returns:
- the number of messages removed
- Throws:
Exception
-
moveMatchingMessagesTo
int moveMatchingMessagesTo(String selector, String destinationName, int maximumMessages) throws Exception
Moves the messages matching the given selector up to the maximum number of matched messages- Throws:
Exception
-
retryMessages
int retryMessages() throws ExceptionRetries messages sent to the DLQ- Throws:
Exception
-
doesCursorHaveSpace
boolean doesCursorHaveSpace()
- Returns:
- true if the message cursor has memory space available to page in more messages
-
isCursorFull
boolean isCursorFull()
- Returns:
- true if the cursor has reached its memory limit for paged in messages
-
doesCursorHaveMessagesBuffered
boolean doesCursorHaveMessagesBuffered()
- Returns:
- true if the cursor has messages buffered to deliver
-
getCursorMemoryUsage
long getCursorMemoryUsage()
- Returns:
- the cursor memory usage in bytes
-
getCursorPercentUsage
int getCursorPercentUsage()
- Returns:
- the cursor memory usage as a percentage
-
cursorSize
int cursorSize()
- Returns:
- the number of messages available to be paged in by the cursor
-
isCacheEnabled
boolean isCacheEnabled()
- Returns:
- true if caching is currently enabled of for the destination
-
getMessageGroups
Map<String,String> getMessageGroups()
- Returns:
- a Map of groupNames and ConsumerIds
-
getMessageGroupType
String getMessageGroupType()
- Returns:
- the message group type implementation (simple,bucket,cached)
-
removeMessageGroup
void removeMessageGroup(String groupName)
remove a message group = has the effect of rebalancing group- Parameters:
groupName-
-
removeAllMessageGroups
void removeAllMessageGroups()
remove all the message groups - will rebalance all message groups across consumers
-
pause
void pause()
-
resume
void resume()
-
isPaused
boolean isPaused()
-
-