Class QueueControlImpl
- All Implemented Interfaces:
DynamicMBean,MBeanRegistration,QueueControl
-
Field Summary
FieldsFields 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
ConstructorsConstructorDescriptionQueueControlImpl(Queue queue, String address, ActiveMQServer server, StorageManager storageManager, SecurityStore securityStore, HierarchicalRepository<AddressSettings> addressSettingsRepository) -
Method Summary
Modifier and TypeMethodDescriptionbrowse()browse(int page, int pageSize) 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.booleancopyMessage(long messageID, String targetQueue) longcountDeliveringMessages(String filterStr) Counts the number of delivering messages in this queue matching the specified filter.countDeliveringMessages(String filterStr, String groupByProperty) Counts the number of delivering messages in this queue matching the specified filter, grouped by the given property field.longlongcountMessages(String filterStr) Counts the number of messages in this queue matching the specified filter.countMessages(String filterStr, String groupByProperty) Counts the number of messages in this queue matching the specified filter, grouped by the given property field.voiddeliverScheduledMessage(long messageId) Deliver the scheduled message with the specified message IDvoiddeliverScheduledMessages(String filter) Deliver the scheduled messages which match the filtervoiddisable()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[]protected MBeanOperationInfo[]voidit will flush one cycle on internal executors, so you would be sure that any pending tasks are done before you call any other measure.longReturns the number of messages added to this queue since it was created.Returns the address this queue is bound to.intReturns the number of consumers consuming messages from this queue.intReturns the Consumers Before Dispatch.Returns the dead-letter address associated with this queue.longReturns the Delay Before Dispatch.intReturns the number of messages that this queue is currently delivering to its consumers.longReturns the persistent size of messages that this queue is currently delivering to its consumers.intReturns the number of durable messages that this queue is currently delivering to its consumers.longReturns the size of durable messages that this queue is currently delivering to its consumers.longReturns the number of durable messages currently in this queue.longReturns 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.longReturns the number of durable scheduled messages in this queue.longReturns the size of durable scheduled messages in this queue.Returns the expiry address associated with this queue.Returns the filter associated with this queue.Deprecated.Returns the age of the first message in milliseconds.Deprecated.UsepeekFirstMessageAsJSON()instead.Returns the timestamp of the first message in milliseconds.intWill return the group buckets.intWill return the current number of active groups.Will return the header key to notify a consumer of a group change.longgetID()Returns this queue ID.Returns key used for the last value queues.intlongReturns the number of messages currently in this queue.longReturns the number of messages added to this queue since it was created.longReturns the number of messages added to this queue since it was created.longReturns the number of messages expired from this queue since it was created.longReturns the number of messages removed from this queue since it was created due to exceeding the max delivery attempts.getName()Returns the name of this queue.longReturns 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.intWill return the number of messages stuck in prepared transactionslongWill return the ring size.The routing type of this queue.longReturns the number of scheduled messages in this queue.longReturns the size of scheduled messages in this queue.getUser()Returns the user that is associated with creating the queue.booleanReturns whether this queue is available for auto deletion.booleanbooleanReturns whether this queue is durable.booleanbooleanbooleanReturns whether the groups of this queue are automatically rebalanced.booleanReturns whether the dispatch is paused when groups of this queue are automatically rebalanced.booleanReturns whether this queue was created for the broker's internal use.booleanbooleanisPaused()Returns whether the queue is paused.booleanReturns whether the queue's paused status is persisted.booleanbooleanReturns whether this queue is used for a retroactive address.booleanReturns whether this queue is temporary.Lists all the messages being deliver per consumer.Executes a conversion ofQueueControl.listDeliveringMessages()to JSONLists the message counter for this queue.Deprecated.Lists the message counter history for this queue.Deprecated.listMessages(String filterStr) Lists all the messages in this queue matching the specified filter.listMessagesAsJSON(String filter) Lists all the messages in this queue matching the specified filter using JSON serialization.Lists all the messages scheduled for delivery for this queue.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.this method returns a Map representing the first message. or null if there's no first message.UsespeekFirstMessage()and returns the result as JSON.this method returns a Map representing the first scheduled message. or null if there's no first message.UsespeekFirstScheduledMessage()and returns the result as JSON.intRemoves 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.voidWill reset the all the groups.voidresetGroup(String groupID) Will reset the group matching the given groupID.voidResets the message counter for this queue.voidResets the MessagesAdded propertyvoidResets the MessagesAdded propertyvoidResets the MessagesExpired propertyvoidResets the MessagesExpired propertyvoidresume()Resumes the queue.booleanretryMessage(long messageID) Retries the message corresponding to the given messageID to the original queue.intRetries all messages on a DLQ to their respective original queues.sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password) Sends a TextMessage to a password-protected destination.sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) Sends a TextMessage to a password-protected destination.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, tcclInvokeMethods 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 Details
-
FLUSH_LIMIT
public static final int FLUSH_LIMIT- See Also:
-
-
Constructor Details
-
QueueControlImpl
public QueueControlImpl(Queue queue, String address, ActiveMQServer server, StorageManager storageManager, SecurityStore securityStore, HierarchicalRepository<AddressSettings> addressSettingsRepository) throws Exception - Throws:
Exception
-
-
Method Details
-
setMessageCounter
-
getName
Description copied from interface:QueueControlReturns the name of this queue.- Specified by:
getNamein interfaceQueueControl- Returns:
- the name of this queue
-
getAddress
Description copied from interface:QueueControlReturns the address this queue is bound to.- Specified by:
getAddressin interfaceQueueControl- Returns:
- the address this queue is bound to
-
getFilter
Description copied from interface:QueueControlReturns the filter associated with this queue.- Specified by:
getFilterin interfaceQueueControl- Returns:
- the filter associated with this queue
-
isDurable
public boolean isDurable()Description copied from interface:QueueControlReturns whether this queue is durable.- Specified by:
isDurablein interfaceQueueControl- Returns:
- whether this queue is durable
-
getUser
Description copied from interface:QueueControlReturns the user that is associated with creating the queue.- Specified by:
getUserin interfaceQueueControl- Returns:
- the user that is associated with creating the queue
-
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- Returns:
- whether this queue is temporary
-
isRetroactiveResource
public boolean isRetroactiveResource()Description copied from interface:QueueControlReturns whether this queue is used for a retroactive address.- Specified by:
isRetroactiveResourcein interfaceQueueControl- Returns:
- whether this queue is used for a retroactive address
-
getMessageCount
public long getMessageCount()Description copied from interface:QueueControlReturns the number of messages currently in this queue.- Specified by:
getMessageCountin interfaceQueueControl- Returns:
- the number of messages currently in this queue
-
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- Returns:
- 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
-
getDurableMessageCount
public long getDurableMessageCount()Description copied from interface:QueueControlReturns the number of durable messages currently in this queue.- Specified by:
getDurableMessageCountin interfaceQueueControl- Returns:
- the number of durable messages currently in this queue
-
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- Returns:
- 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
-
getConsumerCount
public int getConsumerCount()Description copied from interface:QueueControlReturns the number of consumers consuming messages from this queue.- Specified by:
getConsumerCountin interfaceQueueControl- Returns:
- the number of consumers consuming messages from this queue
-
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- Returns:
- the number of messages that this queue is currently delivering to its consumers
-
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- Returns:
- the persistent size of messages that this queue is currently delivering to its consumers
-
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- Returns:
- the number of durable messages that this queue is currently delivering to its consumers
-
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- Returns:
- the size of durable messages that this queue is currently delivering to its consumers
-
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- Returns:
- the number of messages added to this queue since it was created
-
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- Returns:
- the number of messages added to this queue since it was created
-
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- Returns:
- the number of messages added to this queue since it was created
-
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- Returns:
- the number of messages expired from this queue since it was created
-
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- Returns:
- the number of messages removed from this queue since it was created due to exceeding the max delivery attempts
-
getID
public long getID()Description copied from interface:QueueControlReturns this queue ID.- Specified by:
getIDin interfaceQueueControl- Returns:
- this queue ID
-
getScheduledCount
public long getScheduledCount()Description copied from interface:QueueControlReturns the number of scheduled messages in this queue.- Specified by:
getScheduledCountin interfaceQueueControl- Returns:
- the number of scheduled messages in this queue
-
getScheduledSize
public long getScheduledSize()Description copied from interface:QueueControlReturns the size of scheduled messages in this queue.- Specified by:
getScheduledSizein interfaceQueueControl- Returns:
- the size of scheduled messages in this queue
-
getDurableScheduledCount
public long getDurableScheduledCount()Description copied from interface:QueueControlReturns the number of durable scheduled messages in this queue.- Specified by:
getDurableScheduledCountin interfaceQueueControl- Returns:
- the number of durable scheduled messages in this queue
-
getDurableScheduledSize
public long getDurableScheduledSize()Description copied from interface:QueueControlReturns the size of durable scheduled messages in this queue.- Specified by:
getDurableScheduledSizein interfaceQueueControl- Returns:
- the size of durable scheduled messages in this queue
-
getDeadLetterAddress
Description copied from interface:QueueControlReturns the dead-letter address associated with this queue.- Specified by:
getDeadLetterAddressin interfaceQueueControl- Returns:
- the dead-letter address associated with this queue
-
getExpiryAddress
Description copied from interface:QueueControlReturns the expiry address associated with this queue.- Specified by:
getExpiryAddressin interfaceQueueControl- Returns:
- the expiry address associated with this queue
-
getMaxConsumers
public int getMaxConsumers()- Specified by:
getMaxConsumersin interfaceQueueControl
-
isPurgeOnNoConsumers
public boolean isPurgeOnNoConsumers()- Specified by:
isPurgeOnNoConsumersin interfaceQueueControl
-
disable
Description copied from interface:QueueControlEnables the queue. Messages are not routed to this queue.- Specified by:
disablein interfaceQueueControl- Throws:
Exception
-
enable
Description 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
Description copied from interface:QueueControlReturns key used for the last value queues.- Specified by:
getLastValueKeyin interfaceQueueControl- Returns:
- key used for the last value queues
-
getConsumersBeforeDispatch
public int getConsumersBeforeDispatch()Description copied from interface:QueueControlReturns the Consumers Before Dispatch.- Specified by:
getConsumersBeforeDispatchin interfaceQueueControl- Returns:
- the Consumers Before Dispatch
-
getDelayBeforeDispatch
public long getDelayBeforeDispatch()Description copied from interface:QueueControlReturns the Delay Before Dispatch.- Specified by:
getDelayBeforeDispatchin interfaceQueueControl- Returns:
- the Delay Before Dispatch
-
listScheduledMessages
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
Description copied from interface:QueueControlLists all the messages scheduled for delivery for this queue using JSON serialization.- Specified by:
listScheduledMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
listDeliveringMessages
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 a
Map<String,Object>[]same way is returned byQueueControl.listScheduledMessages()- Specified by:
listDeliveringMessagesin interfaceQueueControl- Throws:
ActiveMQException
-
listDeliveringMessagesAsJSON
Description copied from interface:QueueControlExecutes a conversion ofQueueControl.listDeliveringMessages()to JSON- Specified by:
listDeliveringMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
listMessages
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.
Using
nullor an empty filter will list all messages from this queue.- Specified by:
listMessagesin interfaceQueueControl- Throws:
Exception
-
listMessagesAsJSON
Description copied from interface:QueueControlLists all the messages in this queue matching the specified filter using JSON serialization.Using
nullor an empty filter will list all messages from this queue.- Specified by:
listMessagesAsJSONin interfaceQueueControl- Throws:
Exception
-
getFirstMessage
Deprecated.UsepeekFirstMessage()instead.this method returns a Map representing the first message. or null if there's no first message.- Throws:
Exception
-
peekFirstMessage
this method returns a Map representing the first message. or null if there's no first message.- Returns:
- A result of
Message.toMap()
-
peekFirstScheduledMessage
this method returns a Map representing the first scheduled message. or null if there's no first message.- Returns:
- A result of
Message.toMap()
-
getFirstMessageAsJSON
Deprecated.UsepeekFirstMessageAsJSON()instead.Description copied from interface:QueueControlReturns the first message on the queue as JSON.- Specified by:
getFirstMessageAsJSONin interfaceQueueControl- Returns:
- the first message on the queue as JSON
- Throws:
Exception
-
peekFirstMessageAsJSON
UsespeekFirstMessage()and returns the result as JSON.- Specified by:
peekFirstMessageAsJSONin interfaceQueueControl- Returns:
- A
Messageinstance as a JSON object, or"null"if there's no such message
-
peekFirstScheduledMessageAsJSON
UsespeekFirstScheduledMessage()and returns the result as JSON.- Specified by:
peekFirstScheduledMessageAsJSONin interfaceQueueControl- Returns:
- A
Messageinstance as a JSON object, or"null"if there's no such message
-
getFirstMessageTimestamp
Description copied from interface:QueueControlReturns the timestamp of the first message in milliseconds.- Specified by:
getFirstMessageTimestampin interfaceQueueControl- Returns:
- the timestamp of the first message in milliseconds
- Throws:
Exception
-
getFirstMessageAge
Description copied from interface:QueueControlReturns the age of the first message in milliseconds.- Specified by:
getFirstMessageAgein interfaceQueueControl- Returns:
- the age of the first message in milliseconds
- Throws:
Exception
-
countMessages
- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countMessages
Description copied from interface:QueueControlCounts the number of messages in this queue matching the specified filter.Using
nullor an empty filter will count all messages from this queue.- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
isInternalQueue
public boolean isInternalQueue()Description copied from interface:QueueControlReturns whether this queue was created for the broker's internal use.- Specified by:
isInternalQueuein interfaceQueueControl- Returns:
- whether this queue was created for the broker's internal use
-
countMessages
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"Using
nullor an empty filter will count all messages from this queue.- Specified by:
countMessagesin interfaceQueueControl- Throws:
Exception
-
countDeliveringMessages
Description copied from interface:QueueControlCounts the number of delivering messages in this queue matching the specified filter.Using
nullor an empty filter will count all messages from this queue.- Specified by:
countDeliveringMessagesin interfaceQueueControl- Throws:
Exception
-
countDeliveringMessages
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"Using
nullor an empty filter will count all messages from this queue.- Specified by:
countDeliveringMessagesin interfaceQueueControl- Throws:
Exception
-
removeMessage
Description 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
Description copied from interface:QueueControlRemoves all the message corresponding to the specified filter.Using
nullor an empty filter will remove all messages from this queue.- Specified by:
removeMessagesin interfaceQueueControl- Returns:
- the number of removed messages
- Throws:
Exception
-
removeMessages
Description copied from interface:QueueControlRemoves all the message corresponding to the specified filter.Using
nullor an empty filter will remove all messages from this queue.- Specified by:
removeMessagesin interfaceQueueControl- Returns:
- the number of removed messages
- Throws:
Exception
-
removeAllMessages
Description copied from interface:QueueControlRemoves all the message from the queue.- Specified by:
removeAllMessagesin interfaceQueueControl- Returns:
- the number of removed messages
- Throws:
Exception
-
expireMessage
Description 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
Description copied from interface:QueueControlExpires all the message corresponding to the specified filter.Using
nullor an empty filter will expire all messages from this queue.- Specified by:
expireMessagesin interfaceQueueControl- Returns:
- the number of expired messages
- Throws:
Exception
-
retryMessage
Description 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
Description 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
Description 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 Exception Description 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
-
copyMessage
- Specified by:
copyMessagein interfaceQueueControl- Throws:
Exception
-
moveMessages
Description copied from interface:QueueControlMoves all the message corresponding to the specified filter to the specified other queue. RejectDuplicates = false on this caseUsing
nullor 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.Using
nullor an empty filter will move all messages from this queue.- Specified by:
moveMessagesin interfaceQueueControl- Returns:
- the number of moved messages
- Throws:
Exception
-
sendMessagesToDeadLetterAddress
Description copied from interface:QueueControlSends all the message corresponding to the specified filter to this queue's dead letter address.Using
nullor 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 ExceptionDescription copied from interface:QueueControlSends a TextMessage to a password-protected destination.- 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- Throws:
Exception
-
sendMessage
public String sendMessage(Map<String, String> headers, int type, String body, boolean durable, String user, String password, boolean createMessageId) throws ExceptionDescription copied from interface:QueueControlSends a TextMessage to a password-protected destination.- 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 to auto generate a Message ID- Throws:
Exception
-
sendMessageToDeadLetterAddress
Description 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
Description copied from interface:QueueControlChanges the priority for all the message corresponding to the specified filter to the specified priority.Using
nullor an empty filter will change all messages from this queue.- Specified by:
changeMessagesPriorityin interfaceQueueControl- Returns:
- the number of changed messages
- Throws:
Exception
-
changeMessagePriority
Description 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
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.Description copied from interface:QueueControlLists the message counter for this queue as a HTML table.- Specified by:
listMessageCounterAsHTMLin interfaceQueueControl
-
listMessageCounterHistory
Description copied from interface:QueueControlLists the message counter history for this queue.- Specified by:
listMessageCounterHistoryin interfaceQueueControl- Throws:
Exception
-
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()Description copied from interface:QueueControlReturns whether the queue is paused.- Specified by:
isPausedin interfaceQueueControl- Returns:
- whether the queue is paused
-
isPersistedPause
public boolean isPersistedPause()Description copied from interface:QueueControlReturns whether the queue's paused status is persisted.- Specified by:
isPersistedPausein interfaceQueueControl- Returns:
- whether the queue's paused status is persisted
-
browse
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
- Specified by:
browsein interfaceQueueControl- Throws:
Exception
-
browse
- 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
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
- Specified by:
listGroupsAsJSONin interfaceQueueControl- Throws:
Exception
-
getRingSize
public long getRingSize()Description copied from interface:QueueControlWill return the ring size.- Specified by:
getRingSizein interfaceQueueControl
-
listConsumersAsJSON
- Specified by:
listConsumersAsJSONin interfaceQueueControl- Throws:
Exception
-
fillMBeanOperationInfo
- Specified by:
fillMBeanOperationInfoin classAbstractControl
-
fillMBeanAttributeInfo
- Specified by:
fillMBeanAttributeInfoin classAbstractControl
-
resetMessagesAdded
Description copied from interface:QueueControlResets the MessagesAdded property- Specified by:
resetMessagesAddedin interfaceQueueControl- Throws:
Exception
-
resetMessagesAcknowledged
Description copied from interface:QueueControlResets the MessagesAdded property- Specified by:
resetMessagesAcknowledgedin interfaceQueueControl- Throws:
Exception
-
resetMessagesExpired
Description copied from interface:QueueControlResets the MessagesExpired property- Specified by:
resetMessagesExpiredin interfaceQueueControl- Throws:
Exception
-
resetMessagesKilled
Description 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- Returns:
- whether the groups of this queue are automatically rebalanced
-
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- Returns:
- whether the dispatch is paused when groups of this queue are automatically rebalanced
-
getGroupBuckets
public int getGroupBuckets()Description copied from interface:QueueControlWill return the group buckets.- Specified by:
getGroupBucketsin interfaceQueueControl
-
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
-
deliverScheduledMessages
Description copied from interface:QueueControlDeliver the scheduled messages which match the filter- Specified by:
deliverScheduledMessagesin interfaceQueueControl- Throws:
Exception
-
deliverScheduledMessage
Description copied from interface:QueueControlDeliver the scheduled message with the specified message ID- Specified by:
deliverScheduledMessagein interfaceQueueControl- Throws:
Exception
-
isAutoDelete
public boolean isAutoDelete()Description copied from interface:QueueControlReturns whether this queue is available for auto deletion.- Specified by:
isAutoDeletein interfaceQueueControl- Returns:
- whether this queue is available for auto deletion
-
peekFirstMessage()instead.