Class QueueControlImpl
- java.lang.Object
-
- javax.management.StandardMBean
-
- org.apache.activemq.artemis.core.management.impl.AbstractControl
-
- org.apache.activemq.artemis.core.management.impl.QueueControlImpl
-
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,QueueControl
public class QueueControlImpl extends AbstractControl implements QueueControl
-
-
Field Summary
Fields Modifier and Type Field Description static intFLUSH_LIMIT-
Fields inherited from interface org.apache.activemq.artemis.api.core.management.QueueControl
CONSUMER_COUNT_DESCRIPTION, DELIVERING_MESSAGE_COUNT_DESCRIPTION, DELIVERING_SIZE_DESCRIPTION, DURABLE_DELIVERING_MESSAGE_COUNT_DESCRIPTION, DURABLE_DELIVERING_SIZE_DESCRIPTION, DURABLE_MESSAGE_COUNT_DESCRIPTION, DURABLE_PERSISTENT_SIZE_DESCRIPTION, DURABLE_SCHEDULED_MESSAGE_COUNT_DESCRIPTION, DURABLE_SCHEDULED_SIZE_DESCRIPTION, MESSAGE_COUNT_DESCRIPTION, MESSAGES_ACKNOWLEDGED_DESCRIPTION, MESSAGES_ADDED_DESCRIPTION, MESSAGES_EXPIRED_DESCRIPTION, MESSAGES_KILLED_DESCRIPTION, PERSISTENT_SIZE_DESCRIPTION, SCHEDULED_MESSAGE_COUNT_DESCRIPTION, SCHEDULED_SIZE_DESCRIPTION
-
-
Constructor Summary
Constructors Constructor Description QueueControlImpl(Queue queue, String address, ActiveMQServer server, StorageManager storageManager, SecurityStore securityStore, HierarchicalRepository<AddressSettings> addressSettingsRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description CompositeData[]browse()CompositeData[]browse(int page, int pageSize)CompositeData[]browse(int page, int pageSize, String filter)CompositeData[]browse(String filter)booleanchangeMessagePriority(long messageID, int newPriority)Changes the message's priority corresponding to the specified message ID to the specified priority.intchangeMessagesPriority(String filterStr, int newPriority)Changes the priority for all the message corresponding to the specified filter to the specified priority.longcountDeliveringMessages(String filterStr)Counts the number of delivering messages in this queue matching the specified filter.StringcountDeliveringMessages(String filterStr, String groupByProperty)Counts the number of delivering messages in this queue matching the specified filter, grouped by the given property field.longcountMessages()longcountMessages(String filterStr)Counts the number of messages in this queue matching the specified filter.StringcountMessages(String filterStr, String groupByProperty)Counts the number of messages in this queue matching the specified filter, grouped by the given property field.voiddisable()Enables the queue.voidenable()Enables the queue.booleanexpireMessage(long messageID)Expires the message corresponding to the specified message ID.intexpireMessages(String filterStr)Expires all the message corresponding to the specified filter.protected MBeanAttributeInfo[]fillMBeanAttributeInfo()protected MBeanOperationInfo[]fillMBeanOperationInfo()voidflushExecutor()it will flush one cycle on internal executors, so you would be sure that any pending tasks are done before you call any other measure.longgetAcknowledgeAttempts()Returns the number of messages added to this queue since it was created.StringgetAddress()Returns the address this queue is bound to.intgetConsumerCount()Returns the number of consumers consuming messages from this queue.intgetConsumersBeforeDispatch()Return the Consumers Before DispatchStringgetDeadLetterAddress()Returns the dead-letter address associated with this queue.longgetDelayBeforeDispatch()Return the Consumers Before DispatchintgetDeliveringCount()Returns the number of messages that this queue is currently delivering to its consumers.longgetDeliveringSize()Returns the persistent size of messages that this queue is currently delivering to its consumers.intgetDurableDeliveringCount()Returns the number of durable messages that this queue is currently delivering to its consumers.longgetDurableDeliveringSize()Returns the size of durable messages that this queue is currently delivering to its consumers.longgetDurableMessageCount()Returns the number of durable messages currently in this queue.longgetDurablePersistentSize()Returns the persistent size of durable messages currently in this queue.longgetDurableScheduledCount()Returns the number of durable scheduled messages in this queue.longgetDurableScheduledSize()Returns the size of durable scheduled messages in this queue.StringgetExpiryAddress()Returns the expiry address associated with this queue.StringgetFilter()Returns the filter associated with this queue.protected Map<String,Object>getFirstMessage()this method returns a Map representing the first message.LonggetFirstMessageAge()Returns the age of the first message in milliseconds.StringgetFirstMessageAsJSON()Returns the first message on the queue as JSONLonggetFirstMessageTimestamp()Returns the timestamp of the first message in milliseconds.intgetGroupBuckets()Will return the group buckets.intgetGroupCount()Will return the current number of active groups.StringgetGroupFirstKey()Will return the header key to notify a consumer of a group change.longgetID()Returns this queue ID.StringgetLastValueKey()The key used for the last value queuesintgetMaxConsumers()longgetMessageCount()Returns the number of messages currently in this queue.longgetMessagesAcknowledged()Returns the number of messages added to this queue since it was created.longgetMessagesAdded()Returns the number of messages added to this queue since it was created.longgetMessagesExpired()Returns the number of messages expired from this queue since it was created.longgetMessagesKilled()Returns the number of messages removed from this queue since it was created due to exceeding the max delivery attempts.StringgetName()Returns the name of this queue.longgetPersistentSize()Returns the persistent size of all messages currently in this queue.intgetPreparedTransactionMessageCount()Will return the number of messages stuck in prepared transactionslonggetRingSize()Will return the ring size.StringgetRoutingType()The routing type of this queue.longgetScheduledCount()Returns the number of scheduled messages in this queue.longgetScheduledSize()Returns the size of scheduled messages in this queue.StringgetUser()Returns the user that is associated with creating the queue.booleanisConfigurationManaged()booleanisDurable()Returns whether this queue is durable.booleanisEnabled()booleanisExclusive()booleanisGroupRebalance()Returns whether the groups of this queue are automatically rebalanced.booleanisGroupRebalancePauseDispatch()Returns whether the dispatch is paused when groups of this queue are automatically rebalanced.booleanisLastValue()booleanisPaused()Returns whether the queue is paused.booleanisPurgeOnNoConsumers()booleanisRetroactiveResource()Returns whether this queue is used for a retroactive address.booleanisTemporary()Returns whether this queue is temporary.StringlistConsumersAsJSON()Map<String,Map<String,Object>[]>listDeliveringMessages()Lists all the messages being deliver per consumer.StringlistDeliveringMessagesAsJSON()Executes a conversion ofQueueControl.listDeliveringMessages()to JSONStringlistGroupsAsJSON()StringlistMessageCounter()Lists the message counter for this queue.StringlistMessageCounterAsHTML()Deprecated.StringlistMessageCounterHistory()Lists the message counter history for this queue.StringlistMessageCounterHistoryAsHTML()Deprecated.Map<String,Object>[]listMessages(String filterStr)Lists all the messages in this queue matching the specified filter.StringlistMessagesAsJSON(String filter)Lists all the messages in this queue matching the specified filter using JSON serialization.Map<String,Object>[]listScheduledMessages()Lists all the messages scheduled for delivery for this queue.StringlistScheduledMessagesAsJSON()Lists all the messages scheduled for delivery for this queue using JSON serialization.booleanmoveMessage(long messageID, String otherQueueName)Moves the message corresponding to the specified message ID to the specified other queue.booleanmoveMessage(long messageID, String otherQueueName, boolean rejectDuplicates)Moves the message corresponding to the specified message ID to the specified other queue.intmoveMessages(int flushLimit, String filterStr, String otherQueueName, boolean rejectDuplicates)intmoveMessages(int flushLimit, String filterStr, String otherQueueName, boolean rejectDuplicates, int messageCount)intmoveMessages(String filterStr, String otherQueueName)Moves all the message corresponding to the specified filter to the specified other queue.intmoveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates)Moves all the message corresponding to the specified filter to the specified other queue.voidpause()Pauses the queue.voidpause(boolean persist)Pauses the queue.intremoveAllMessages()Removes all the message from the queue.booleanremoveMessage(long messageID)Removes the message corresponding to the specified message ID.intremoveMessages(int flushLimit, String filterStr)Removes all the message corresponding to the specified filter.intremoveMessages(String filterStr)Removes all the message corresponding to the specified filter.voidresetAllGroups()Will reset the all the groups.voidresetGroup(String groupID)Will reset the group matching the given groupID.voidresetMessageCounter()Resets the message counter for this queue.voidresetMessagesAcknowledged()Resets the MessagesAdded propertyvoidresetMessagesAdded()Resets the MessagesAdded propertyvoidresetMessagesExpired()Resets the MessagesExpired propertyvoidresetMessagesKilled()Resets the MessagesExpired propertyvoidresume()Resumes the queue.booleanretryMessage(long messageID)Retries the message corresponding to the given messageID to the original queue.intretryMessages()Retries all messages on a DLQ to their respective original queues.StringsendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password)StringsendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId)intsendMessagesToDeadLetterAddress(String filterStr)Sends all the message corresponding to the specified filter to this queue's dead letter address.booleansendMessageToDeadLetterAddress(long messageID)Sends the message corresponding to the specified message ID to this queue's dead letter address.voidsetMessageCounter(MessageCounter counter)-
Methods inherited from class org.apache.activemq.artemis.core.management.impl.AbstractControl
blockOnIO, clearIO, getMBeanInfo, sendMessage, tcclCall, tcclInvoke
-
Methods inherited from class javax.management.StandardMBean
cacheMBeanInfo, getAttribute, getAttributes, getCachedMBeanInfo, getClassName, getConstructors, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getDescription, getImpact, getImplementation, getImplementationClass, getMBeanInterface, getParameterName, getParameterName, invoke, postDeregister, postRegister, preDeregister, preRegister, setAttribute, setAttributes, setImplementation
-
-
-
-
Field Detail
-
FLUSH_LIMIT
public static final int FLUSH_LIMIT
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
QueueControlImpl
public QueueControlImpl(Queue queue, String address, ActiveMQServer server, StorageManager storageManager, SecurityStore securityStore, HierarchicalRepository<AddressSettings> addressSettingsRepository) throws Exception
- Throws:
Exception
-
-
Method Detail
-
setMessageCounter
public void setMessageCounter(MessageCounter counter)
-
getName
public String getName()
Description copied from interface:QueueControlReturns the name of this queue.- Specified by:
getNamein interfaceQueueControl
-
getAddress
public String getAddress()
Description copied from interface:QueueControlReturns the address this queue is bound to.- Specified by:
getAddressin interfaceQueueControl
-
getFilter
public String getFilter()
Description copied from interface:QueueControlReturns the filter associated with this queue.- Specified by:
getFilterin interfaceQueueControl
-
isDurable
public boolean isDurable()
Description copied from interface:QueueControlReturns whether this queue is durable.- Specified by:
isDurablein interfaceQueueControl
-
getUser
public String getUser()
Description copied from interface:QueueControlReturns the user that is associated with creating the queue.- Specified by:
getUserin interfaceQueueControl
-
getRoutingType
public String getRoutingType()
Description copied from interface:QueueControlThe routing type of this queue.- Specified by:
getRoutingTypein interfaceQueueControl
-
isTemporary
public boolean isTemporary()
Description copied from interface:QueueControlReturns whether this queue is temporary.- Specified by:
isTemporaryin interfaceQueueControl
-
isRetroactiveResource
public boolean isRetroactiveResource()
Description copied from interface:QueueControlReturns whether this queue is used for a retroactive address.- Specified by:
isRetroactiveResourcein interfaceQueueControl
-
getMessageCount
public long getMessageCount()
Description copied from interface:QueueControlReturns the number of messages currently in this queue.- Specified by:
getMessageCountin interfaceQueueControl
-
getPersistentSize
public long getPersistentSize()
Description copied from interface:QueueControlReturns the persistent size of all messages currently in this queue. The persistent size of a message is the amount of space the message would take up on disk which is used to track how much data there is to consume on this queue- Specified by:
getPersistentSizein interfaceQueueControl
-
getDurableMessageCount
public long getDurableMessageCount()
Description copied from interface:QueueControlReturns the number of durable messages currently in this queue.- Specified by:
getDurableMessageCountin interfaceQueueControl
-
getDurablePersistentSize
public long getDurablePersistentSize()
Description copied from interface:QueueControlReturns the persistent size of durable messages currently in this queue. The persistent size of a message is the amount of space the message would take up on disk which is used to track how much data there is to consume on this queue- Specified by:
getDurablePersistentSizein interfaceQueueControl
-
getConsumerCount
public int getConsumerCount()
Description copied from interface:QueueControlReturns the number of consumers consuming messages from this queue.- Specified by:
getConsumerCountin interfaceQueueControl
-
getDeliveringCount
public int getDeliveringCount()
Description copied from interface:QueueControlReturns the number of messages that this queue is currently delivering to its consumers.- Specified by:
getDeliveringCountin interfaceQueueControl
-
getDeliveringSize
public long getDeliveringSize()
Description copied from interface:QueueControlReturns the persistent size of messages that this queue is currently delivering to its consumers.- Specified by:
getDeliveringSizein interfaceQueueControl
-
getDurableDeliveringCount
public int getDurableDeliveringCount()
Description copied from interface:QueueControlReturns the number of durable messages that this queue is currently delivering to its consumers.- Specified by:
getDurableDeliveringCountin interfaceQueueControl
-
getDurableDeliveringSize
public long getDurableDeliveringSize()
Description copied from interface:QueueControlReturns the size of durable messages that this queue is currently delivering to its consumers.- Specified by:
getDurableDeliveringSizein interfaceQueueControl
-
getMessagesAdded
public long getMessagesAdded()
Description copied from interface:QueueControlReturns the number of messages added to this queue since it was created.- Specified by:
getMessagesAddedin interfaceQueueControl
-
getMessagesAcknowledged
public long getMessagesAcknowledged()
Description copied from interface:QueueControlReturns the number of messages added to this queue since it was created.- Specified by:
getMessagesAcknowledgedin interfaceQueueControl
-
getAcknowledgeAttempts
public long getAcknowledgeAttempts()
Description copied from interface:QueueControlReturns the number of messages added to this queue since it was created.- Specified by:
getAcknowledgeAttemptsin interfaceQueueControl
-
getMessagesExpired
public long getMessagesExpired()
Description copied from interface:QueueControlReturns the number of messages expired from this queue since it was created.- Specified by:
getMessagesExpiredin interfaceQueueControl
-
getMessagesKilled
public long getMessagesKilled()
Description copied from interface:QueueControlReturns the number of messages removed from this queue since it was created due to exceeding the max delivery attempts.- Specified by:
getMessagesKilledin interfaceQueueControl
-
getID
public long getID()
Description copied from interface:QueueControlReturns this queue ID.- Specified by:
getIDin interfaceQueueControl
-
getScheduledCount
public long getScheduledCount()
Description copied from interface:QueueControlReturns the number of scheduled messages in this queue.- Specified by:
getScheduledCountin interfaceQueueControl
-
getScheduledSize
public long getScheduledSize()
Description copied from interface:QueueControlReturns the size of scheduled messages in this queue.- Specified by:
getScheduledSizein interfaceQueueControl
-
getDurableScheduledCount
public long getDurableScheduledCount()
Description copied from interface:QueueControlReturns the number of durable scheduled messages in this queue.- Specified by:
getDurableScheduledCountin interfaceQueueControl
-
getDurableScheduledSize
public long getDurableScheduledSize()
Description copied from interface:QueueControlReturns the size of durable scheduled messages in this queue.- Specified by:
getDurableScheduledSizein interfaceQueueControl
-
getDeadLetterAddress
public String getDeadLetterAddress()
Description copied from interface:QueueControlReturns the dead-letter address associated with this queue.- Specified by:
getDeadLetterAddressin interfaceQueueControl
-
getExpiryAddress
public String getExpiryAddress()
Description copied from interface:QueueControlReturns the expiry address associated with this queue.- Specified by:
getExpiryAddressin interfaceQueueControl
-
getMaxConsumers
public int getMaxConsumers()
- Specified by:
getMaxConsumersin interfaceQueueControl
-
isPurgeOnNoConsumers
public boolean isPurgeOnNoConsumers()
- Specified by:
isPurgeOnNoConsumersin interfaceQueueControl
-
disable
public void disable() throws ExceptionDescription copied from interface:QueueControlEnables the queue. Messages are not routed to this queue.- Specified by:
disablein interfaceQueueControl- Throws:
Exception
-
enable
public void enable() throws ExceptionDescription copied from interface:QueueControlEnables the queue. Messages are now routed to this queue.- Specified by:
enablein interfaceQueueControl- Throws:
Exception
-
isEnabled
public boolean isEnabled()
- Specified by:
isEnabledin interfaceQueueControl
-
isConfigurationManaged
public boolean isConfigurationManaged()
- Specified by:
isConfigurationManagedin interfaceQueueControl
-
isExclusive
public boolean isExclusive()
- Specified by:
isExclusivein interfaceQueueControl
-
isLastValue
public boolean isLastValue()
- Specified by:
isLastValuein interfaceQueueControl
-
getLastValueKey
public String getLastValueKey()
Description copied from interface:QueueControlThe key used for the last value queues- Specified by:
getLastValueKeyin interfaceQueueControl
-
getConsumersBeforeDispatch
public int getConsumersBeforeDispatch()
Description copied from interface:QueueControlReturn the Consumers Before Dispatch- Specified by:
getConsumersBeforeDispatchin interfaceQueueControl- Returns:
-
getDelayBeforeDispatch
public long getDelayBeforeDispatch()
Description copied from interface:QueueControlReturn the Consumers Before Dispatch- Specified by:
getDelayBeforeDispatchin interfaceQueueControl- Returns:
-
listScheduledMessages
public Map<String,Object>[] listScheduledMessages() throws Exception
Description copied from interface:QueueControlLists all the messages scheduled for delivery for this queue.
1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.- Specified by:
listScheduledMessagesin interfaceQueueControl- Throws:
Exception
-
listScheduledMessagesAsJSON
public String listScheduledMessagesAsJSON() throws Exception
Description copied from interface:QueueControlLists all the messages scheduled for delivery for this queue using JSON serialization.- Specified by:
listScheduledMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
listDeliveringMessages
public Map<String,Map<String,Object>[]> listDeliveringMessages() throws ActiveMQException
Description copied from interface:QueueControlLists all the messages being deliver per consumer.
The Map's key is a toString representation for the consumer. Each consumer will then return aMap<String,Object>[]same way is returned byQueueControl.listScheduledMessages()- Specified by:
listDeliveringMessagesin interfaceQueueControl- Throws:
ActiveMQException
-
listDeliveringMessagesAsJSON
public String listDeliveringMessagesAsJSON() throws Exception
Description copied from interface:QueueControlExecutes a conversion ofQueueControl.listDeliveringMessages()to JSON- Specified by:
listDeliveringMessagesAsJSONin interfaceQueueControl- Returns:
- Throws:
Exception
-
listMessages
public Map<String,Object>[] listMessages(String filterStr) throws Exception
Description copied from interface:QueueControlLists all the messages in this queue matching the specified filter.
1 Map represents 1 message, keys are the message's properties and headers, values are the corresponding values.
Usingnullor an empty filter will list all messages from this queue.- Specified by:
listMessagesin interfaceQueueControl- Throws:
Exception
-
listMessagesAsJSON
public String listMessagesAsJSON(String filter) throws Exception
Description copied from interface:QueueControlLists all the messages in this queue matching the specified filter using JSON serialization.
Usingnullor an empty filter will list all messages from this queue.- Specified by:
listMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
getFirstMessage
protected Map<String,Object> getFirstMessage() throws Exception
this method returns a Map representing the first message. or null if there's no first message.- Returns:
- Throws:
Exception
-
getFirstMessageAsJSON
public String getFirstMessageAsJSON() throws Exception
Description copied from interface:QueueControlReturns the first message on the queue as JSON- Specified by:
getFirstMessageAsJSONin interfaceQueueControl- Throws:
Exception
-
getFirstMessageTimestamp
public Long getFirstMessageTimestamp() throws Exception
Description copied from interface:QueueControlReturns the timestamp of the first message in milliseconds.- Specified by:
getFirstMessageTimestampin interfaceQueueControl- Throws:
Exception
-
getFirstMessageAge
public Long getFirstMessageAge() throws Exception
Description copied from interface:QueueControlReturns the age of the first message in milliseconds.- Specified by:
getFirstMessageAgein interfaceQueueControl- Throws:
Exception
-
countMessages
public long countMessages() throws Exception- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countMessages
public long countMessages(String filterStr) throws Exception
Description copied from interface:QueueControlCounts the number of messages in this queue matching the specified filter.
Usingnullor an empty filter will count all messages from this queue.- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countMessages
public String countMessages(String filterStr, String groupByProperty) throws Exception
Description copied from interface:QueueControlCounts the number of messages in this queue matching the specified filter, grouped by the given property field. In case of null property will be grouped in "null"
Usingnullor an empty filter will count all messages from this queue.- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countDeliveringMessages
public long countDeliveringMessages(String filterStr) throws Exception
Description copied from interface:QueueControlCounts the number of delivering messages in this queue matching the specified filter.
Usingnullor an empty filter will count all messages from this queue.- Specified by:
countDeliveringMessagesin interfaceQueueControl- Throws:
Exception
-
countDeliveringMessages
public String countDeliveringMessages(String filterStr, String groupByProperty) throws Exception
Description copied from interface:QueueControlCounts the number of delivering messages in this queue matching the specified filter, grouped by the given property field. In case of null property will be grouped in "null"
Usingnullor an empty filter will count all messages from this queue.- Specified by:
countDeliveringMessagesin interfaceQueueControl- Throws:
Exception
-
removeMessage
public boolean removeMessage(long messageID) throws ExceptionDescription copied from interface:QueueControlRemoves the message corresponding to the specified message ID.- Specified by:
removeMessagein interfaceQueueControl- Returns:
trueif the message was removed,falseelse- Throws:
Exception
-
removeMessages
public int removeMessages(String filterStr) throws Exception
Description copied from interface:QueueControlRemoves all the message corresponding to the specified filter.
Usingnullor an empty filter will remove all messages from this queue.- Specified by:
removeMessagesin interfaceQueueControl- Returns:
- the number of removed messages
- Throws:
Exception
-
removeMessages
public int removeMessages(int flushLimit, String filterStr) throws ExceptionDescription copied from interface:QueueControlRemoves all the message corresponding to the specified filter.
Usingnullor an empty filter will remove all messages from this queue.- Specified by:
removeMessagesin interfaceQueueControl- Returns:
- the number of removed messages
- Throws:
Exception
-
removeAllMessages
public int removeAllMessages() throws ExceptionDescription copied from interface:QueueControlRemoves all the message from the queue.- Specified by:
removeAllMessagesin interfaceQueueControl- Returns:
- the number of removed messages
- Throws:
Exception
-
expireMessage
public boolean expireMessage(long messageID) throws ExceptionDescription copied from interface:QueueControlExpires the message corresponding to the specified message ID.- Specified by:
expireMessagein interfaceQueueControl- Returns:
trueif the message was expired,falseelse- Throws:
Exception
-
expireMessages
public int expireMessages(String filterStr) throws Exception
Description copied from interface:QueueControlExpires all the message corresponding to the specified filter.
Usingnullor an empty filter will expire all messages from this queue.- Specified by:
expireMessagesin interfaceQueueControl- Returns:
- the number of expired messages
- Throws:
Exception
-
retryMessage
public boolean retryMessage(long messageID) throws ExceptionDescription copied from interface:QueueControlRetries the message corresponding to the given messageID to the original queue. This is appropriate on dead messages on Dead letter queues only.- Specified by:
retryMessagein interfaceQueueControl- Returns:
trueif the message was retried,falseelse- Throws:
Exception
-
retryMessages
public int retryMessages() throws ExceptionDescription copied from interface:QueueControlRetries all messages on a DLQ to their respective original queues. This is appropriate on dead messages on Dead letter queues only.- Specified by:
retryMessagesin interfaceQueueControl- Returns:
- the number of retried messages.
- Throws:
Exception
-
moveMessage
public boolean moveMessage(long messageID, String otherQueueName) throws ExceptionDescription copied from interface:QueueControlMoves the message corresponding to the specified message ID to the specified other queue.- Specified by:
moveMessagein interfaceQueueControl- Returns:
trueif the message was moved,falseelse- Throws:
Exception
-
moveMessage
public boolean moveMessage(long messageID, String otherQueueName, boolean rejectDuplicates) throws ExceptionDescription copied from interface:QueueControlMoves the message corresponding to the specified message ID to the specified other queue.- Specified by:
moveMessagein interfaceQueueControl- Returns:
trueif the message was moved,falseelse- Throws:
Exception
-
moveMessages
public int moveMessages(String filterStr, String otherQueueName) throws Exception
Description copied from interface:QueueControlMoves all the message corresponding to the specified filter to the specified other queue. RejectDuplicates = false on this case
Usingnullor an empty filter will move all messages from this queue.- Specified by:
moveMessagesin interfaceQueueControl- Returns:
- the number of moved messages
- Throws:
Exception
-
moveMessages
public int moveMessages(int flushLimit, String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception- Specified by:
moveMessagesin interfaceQueueControl- Throws:
Exception
-
moveMessages
public int moveMessages(int flushLimit, String filterStr, String otherQueueName, boolean rejectDuplicates, int messageCount) throws Exception- Specified by:
moveMessagesin interfaceQueueControl- Throws:
Exception
-
moveMessages
public int moveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception
Description copied from interface:QueueControlMoves all the message corresponding to the specified filter to the specified other queue.
Usingnullor an empty filter will move all messages from this queue.- Specified by:
moveMessagesin interfaceQueueControl- Returns:
- the number of moved messages
- Throws:
Exception
-
sendMessagesToDeadLetterAddress
public int sendMessagesToDeadLetterAddress(String filterStr) throws Exception
Description copied from interface:QueueControlSends all the message corresponding to the specified filter to this queue's dead letter address.
Usingnullor an empty filter will send all messages from this queue.- Specified by:
sendMessagesToDeadLetterAddressin interfaceQueueControl- Returns:
- the number of sent messages
- Throws:
Exception
-
sendMessage
public String sendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password) throws Exception
- Specified by:
sendMessagein interfaceQueueControl- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to send- Returns:
- Throws:
Exception
-
sendMessage
public String sendMessage(Map<String,String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) throws Exception
- Specified by:
sendMessagein interfaceQueueControl- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to sendcreateMessageId- whether or not to auto generate a Message ID- Returns:
- Throws:
Exception
-
sendMessageToDeadLetterAddress
public boolean sendMessageToDeadLetterAddress(long messageID) throws ExceptionDescription copied from interface:QueueControlSends the message corresponding to the specified message ID to this queue's dead letter address.- Specified by:
sendMessageToDeadLetterAddressin interfaceQueueControl- Returns:
trueif the message was sent to the dead letter address,falseelse- Throws:
Exception
-
changeMessagesPriority
public int changeMessagesPriority(String filterStr, int newPriority) throws Exception
Description copied from interface:QueueControlChanges the priority for all the message corresponding to the specified filter to the specified priority.
Usingnullor an empty filter will change all messages from this queue.- Specified by:
changeMessagesPriorityin interfaceQueueControl- Returns:
- the number of changed messages
- Throws:
Exception
-
changeMessagePriority
public boolean changeMessagePriority(long messageID, int newPriority) throws ExceptionDescription copied from interface:QueueControlChanges the message's priority corresponding to the specified message ID to the specified priority.- Specified by:
changeMessagePriorityin interfaceQueueControlnewPriority- between 0 and 9 inclusive.- Returns:
trueif the message priority was changed- Throws:
Exception
-
listMessageCounter
public String listMessageCounter()
Description copied from interface:QueueControlLists the message counter for this queue.- Specified by:
listMessageCounterin interfaceQueueControl
-
resetMessageCounter
public void resetMessageCounter()
Description copied from interface:QueueControlResets the message counter for this queue.- Specified by:
resetMessageCounterin interfaceQueueControl
-
listMessageCounterAsHTML
@Deprecated public String listMessageCounterAsHTML()
Deprecated.Description copied from interface:QueueControlLists the message counter for this queue as a HTML table.- Specified by:
listMessageCounterAsHTMLin interfaceQueueControl
-
listMessageCounterHistory
public String listMessageCounterHistory() throws Exception
Description copied from interface:QueueControlLists the message counter history for this queue.- Specified by:
listMessageCounterHistoryin interfaceQueueControl- Throws:
Exception
-
listMessageCounterHistoryAsHTML
@Deprecated public String listMessageCounterHistoryAsHTML()
Deprecated.Description copied from interface:QueueControlLists the message counter history for this queue as a HTML table.- Specified by:
listMessageCounterHistoryAsHTMLin interfaceQueueControl
-
pause
public void pause()
Description copied from interface:QueueControlPauses the queue. Messages are no longer delivered to its consumers.- Specified by:
pausein interfaceQueueControl
-
pause
public void pause(boolean persist)
Description copied from interface:QueueControlPauses the queue. Messages are no longer delivered to its consumers.- Specified by:
pausein interfaceQueueControl
-
resume
public void resume()
Description copied from interface:QueueControlResumes the queue. Messages are again delivered to its consumers.- Specified by:
resumein interfaceQueueControl
-
isPaused
public boolean isPaused() throws ExceptionDescription copied from interface:QueueControlReturns whether the queue is paused.- Specified by:
isPausedin interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse(int page, int pageSize) throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse(int page, int pageSize, String filter) throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse() throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
public CompositeData[] browse(String filter) throws Exception
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
flushExecutor
public void flushExecutor()
Description copied from interface:QueueControlit will flush one cycle on internal executors, so you would be sure that any pending tasks are done before you call any other measure. It is useful if you need the exact number of counts on a message- Specified by:
flushExecutorin interfaceQueueControl
-
resetAllGroups
public void resetAllGroups()
Description copied from interface:QueueControlWill reset the all the groups. This is useful if you want a complete rebalance of the groups to consumers- Specified by:
resetAllGroupsin interfaceQueueControl
-
resetGroup
public void resetGroup(String groupID)
Description copied from interface:QueueControlWill reset the group matching the given groupID. This is useful if you want the given group to be rebalanced to the consumers- Specified by:
resetGroupin interfaceQueueControl
-
getGroupCount
public int getGroupCount()
Description copied from interface:QueueControlWill return the current number of active groups.- Specified by:
getGroupCountin interfaceQueueControl
-
listGroupsAsJSON
public String listGroupsAsJSON() throws Exception
- Specified by:
listGroupsAsJSONin interfaceQueueControl- Throws:
Exception
-
getRingSize
public long getRingSize()
Description copied from interface:QueueControlWill return the ring size.- Specified by:
getRingSizein interfaceQueueControl
-
listConsumersAsJSON
public String listConsumersAsJSON() throws Exception
- Specified by:
listConsumersAsJSONin interfaceQueueControl- Throws:
Exception
-
fillMBeanOperationInfo
protected MBeanOperationInfo[] fillMBeanOperationInfo()
- Specified by:
fillMBeanOperationInfoin classAbstractControl
-
fillMBeanAttributeInfo
protected MBeanAttributeInfo[] fillMBeanAttributeInfo()
- Specified by:
fillMBeanAttributeInfoin classAbstractControl
-
resetMessagesAdded
public void resetMessagesAdded() throws ExceptionDescription copied from interface:QueueControlResets the MessagesAdded property- Specified by:
resetMessagesAddedin interfaceQueueControl- Throws:
Exception
-
resetMessagesAcknowledged
public void resetMessagesAcknowledged() throws ExceptionDescription copied from interface:QueueControlResets the MessagesAdded property- Specified by:
resetMessagesAcknowledgedin interfaceQueueControl- Throws:
Exception
-
resetMessagesExpired
public void resetMessagesExpired() throws ExceptionDescription copied from interface:QueueControlResets the MessagesExpired property- Specified by:
resetMessagesExpiredin interfaceQueueControl- Throws:
Exception
-
resetMessagesKilled
public void resetMessagesKilled() throws ExceptionDescription copied from interface:QueueControlResets the MessagesExpired property- Specified by:
resetMessagesKilledin interfaceQueueControl- Throws:
Exception
-
isGroupRebalance
public boolean isGroupRebalance()
Description copied from interface:QueueControlReturns whether the groups of this queue are automatically rebalanced.- Specified by:
isGroupRebalancein interfaceQueueControl
-
isGroupRebalancePauseDispatch
public boolean isGroupRebalancePauseDispatch()
Description copied from interface:QueueControlReturns whether the dispatch is paused when groups of this queue are automatically rebalanced.- Specified by:
isGroupRebalancePauseDispatchin interfaceQueueControl
-
getGroupBuckets
public int getGroupBuckets()
Description copied from interface:QueueControlWill return the group buckets.- Specified by:
getGroupBucketsin interfaceQueueControl
-
getGroupFirstKey
public String getGroupFirstKey()
Description copied from interface:QueueControlWill return the header key to notify a consumer of a group change.- Specified by:
getGroupFirstKeyin interfaceQueueControl
-
getPreparedTransactionMessageCount
public int getPreparedTransactionMessageCount()
Description copied from interface:QueueControlWill return the number of messages stuck in prepared transactions- Specified by:
getPreparedTransactionMessageCountin interfaceQueueControl
-
-