Package org.apache.activemq.broker.jmx
Interface QueueViewMBean
- All Superinterfaces:
DestinationViewMBean
- All Known Implementing Classes:
QueueView
-
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 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, getMaxUncommittedExceededCount, 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 Details
-
getMessage
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
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
Removes the messages matching the given selector- Returns:
- the number of messages removed
- Throws:
Exception
-
removeMatchingMessages
Removes the messages matching the given selector up to the maximum number of matched messages- Returns:
- the number of messages removed
- Throws:
Exception
-
purge
Removes all of the messages in the queue.- Throws:
Exception
-
copyMessageTo
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
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
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
Moves a message back to its original destination- Throws:
Exception
-
moveMatchingMessagesTo
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
Retries 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
- Returns:
- a Map of groupNames and ConsumerIds
-
getMessageGroupType
String getMessageGroupType()- Returns:
- the message group type implementation (simple,bucket,cached)
-
removeMessageGroup
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()
-