public class JMSQueueControlImpl extends StandardMBean implements JMSQueueControl
| Constructor and Description |
|---|
JMSQueueControlImpl(ActiveMQDestination managedQueue,
QueueControl coreQueueControl,
JMSServerManager jmsServerManager,
org.apache.activemq.artemis.core.messagecounter.MessageCounter counter) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBinding(String binding)
Add the JNDI binding to this destination
|
CompositeData[] |
browse()
Resumes the queue.
|
CompositeData[] |
browse(String filter)
Resumes the queue.
|
boolean |
changeMessagePriority(String messageID,
int newPriority)
Changes the message's priority corresponding to the specified message ID to the specified priority.
|
int |
changeMessagesPriority(String filterStr,
int newPriority)
Changes the priority for all the message corresponding to the specified filter to the specified priority.
|
long |
countMessages(String filterStr)
Counts the number of messages in this queue matching the specified filter.
|
static String |
createFilterFromJMSSelector(String selectorStr)
Returns null if the string is null or empty
|
boolean |
expireMessage(String messageID)
Expires the message corresponding to the specified message ID.
|
int |
expireMessages(String filterStr)
Expires all the message corresponding to the specified filter.
|
void |
flushExecutor()
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.
|
String |
getAddress()
Returns the address corresponding to this destination.
|
int |
getConsumerCount()
Returns the number of consumers consuming messages from this queue.
|
String |
getDeadLetterAddress()
Returns the dead-letter address associated with this queue.
|
int |
getDeliveringCount()
Returns the number of messages that this queue is currently delivering to its consumers.
|
String |
getExpiryAddress()
Returns the expiry address associated with this queue.
|
Long |
getFirstMessageAge()
Returns the age of the first message in milliseconds.
|
String |
getFirstMessageAsJSON()
Returns the first message on the queue as JSON
|
Long |
getFirstMessageTimestamp()
Returns the timestamp of the first message in milliseconds.
|
MBeanInfo |
getMBeanInfo() |
long |
getMessageCount()
Returns the number of messages currently in this destination.
|
long |
getMessagesAdded()
Returns the number of messages added to this queue since it was created.
|
long |
getMessagesExpired()
Returns the number of messages expired from this queue since it was created.
|
long |
getMessagesKilled()
Returns the number of messages removed from this queue since it was created due to exceeding the max delivery attempts.
|
String |
getName()
Returns the name of this destination.
|
String[] |
getRegistryBindings()
Returns the Registry bindings associated with this queue.
|
long |
getScheduledCount()
Returns the number of scheduled messages in this queue.
|
String |
getSelector()
returns the selector for the queue
|
boolean |
isDurable() |
boolean |
isPaused()
Returns whether the queue is paused.
|
boolean |
isTemporary()
Returns whether this destination is temporary.
|
String |
listConsumersAsJSON() |
Map<String,Map<String,Object>[]> |
listDeliveringMessages()
Lists all the messages being deliver per consumer.
|
String |
listDeliveringMessagesAsJSON()
Executes a conversion of
JMSQueueControl.listDeliveringMessages() to JSON |
String |
listMessageCounter()
Lists the message counter for this queue.
|
String |
listMessageCounterAsHTML()
Lists the message counter for this queue as a HTML table.
|
String |
listMessageCounterHistory()
Lists the message counter history for this queue.
|
String |
listMessageCounterHistoryAsHTML()
Lists the message counter history for this queue as a HTML table.
|
Map<String,Object>[] |
listMessages(String filterStr)
Lists all the JMS messages in this queue matching the specified filter.
|
String |
listMessagesAsJSON(String filter)
Lists all the JMS 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.
|
String |
listScheduledMessagesAsJSON()
Lists all the messages scheduled for delivery for this queue using JSON serialization.
|
boolean |
moveMessage(String messageID,
String otherQueueName)
Moves the message corresponding to the specified message ID to the specified other queue.
|
boolean |
moveMessage(String messageID,
String otherQueueName,
boolean rejectDuplicates)
Moves the message corresponding to the specified message ID to the specified other queue.
|
int |
moveMessages(String filterStr,
String otherQueueName)
Moves all the message corresponding to the specified filter to the specified other queue.
|
int |
moveMessages(String filterStr,
String otherQueueName,
boolean rejectDuplicates)
Moves all the message corresponding to the specified filter to the specified other queue.
|
void |
pause()
Pauses the queue.
|
void |
pause(boolean persist)
Pauses the queue.
|
boolean |
removeMessage(String messageID)
Removes the message corresponding to the specified message ID.
|
int |
removeMessages(String filterStr)
Removes all the message corresponding to the specified filter.
|
void |
resetMessageCounter()
Resets the message counter for this queue.
|
void |
resume()
Resumes the queue.
|
boolean |
retryMessage(String jmsMessageID)
Retries the message corresponding to the given messageID to the original queue.
|
int |
retryMessages()
Retries all messages on a DLQ to their respective original queues.
|
int |
sendMessagesToDeadLetterAddress(String filterStr)
Sends all the message corresponding to the specified filter to this queue's dead letter address.
|
boolean |
sendMessageToDeadLetterAddress(String messageID)
Sends the message corresponding to the specified message ID to this queue's dead letter address.
|
String |
sendTextMessage(Map<String,String> headers,
String body)
Sends a TextMesage to the destination.
|
String |
sendTextMessage(Map<String,String> headers,
String body,
String user,
String password) |
String |
sendTextMessage(String body)
Sends a TextMesage to the destination.
|
String |
sendTextMessage(String body,
String user,
String password)
Sends a TextMesage to the destination.
|
String |
sendTextMessageWithProperties(String properties)
Sends a TextMessage to the destination.
|
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, setImplementationpublic JMSQueueControlImpl(ActiveMQDestination managedQueue, QueueControl coreQueueControl, JMSServerManager jmsServerManager, org.apache.activemq.artemis.core.messagecounter.MessageCounter counter) throws Exception
Exceptionpublic static String createFilterFromJMSSelector(String selectorStr) throws ActiveMQException
ActiveMQExceptionpublic String getName()
DestinationControlgetName in interface DestinationControlpublic String getAddress()
DestinationControlgetAddress in interface DestinationControlpublic boolean isTemporary()
DestinationControlisTemporary in interface DestinationControlpublic long getMessageCount()
DestinationControlgetMessageCount in interface DestinationControlpublic long getMessagesAdded()
DestinationControlgetMessagesAdded in interface DestinationControlpublic long getMessagesExpired()
JMSQueueControlgetMessagesExpired in interface JMSQueueControlpublic long getMessagesKilled()
JMSQueueControlgetMessagesKilled in interface JMSQueueControlpublic int getConsumerCount()
JMSQueueControlgetConsumerCount in interface JMSQueueControlpublic int getDeliveringCount()
DestinationControlgetDeliveringCount in interface DestinationControlpublic long getScheduledCount()
JMSQueueControlgetScheduledCount in interface JMSQueueControlpublic boolean isDurable()
public String getDeadLetterAddress()
JMSQueueControlgetDeadLetterAddress in interface JMSQueueControlpublic String getExpiryAddress()
JMSQueueControlgetExpiryAddress in interface JMSQueueControlpublic String getFirstMessageAsJSON() throws Exception
JMSQueueControlgetFirstMessageAsJSON in interface JMSQueueControlExceptionpublic Long getFirstMessageTimestamp() throws Exception
JMSQueueControlgetFirstMessageTimestamp in interface JMSQueueControlExceptionpublic Long getFirstMessageAge() throws Exception
JMSQueueControlgetFirstMessageAge in interface JMSQueueControlExceptionpublic void addBinding(String binding) throws Exception
JMSQueueControladdBinding in interface JMSQueueControlExceptionpublic String[] getRegistryBindings()
JMSQueueControlgetRegistryBindings in interface JMSQueueControlpublic boolean removeMessage(String messageID) throws Exception
JMSQueueControlremoveMessage in interface JMSQueueControltrue if the message was removed, false elseExceptionpublic int removeMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will remove all messages from this queue.removeMessages in interface DestinationControlremoveMessages in interface JMSQueueControlExceptionpublic Map<String,Object>[] listMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will list all messages from this queue.listMessages in interface JMSQueueControlExceptionpublic Map<String,Object>[] listScheduledMessages() throws Exception
JMSQueueControllistScheduledMessages in interface JMSQueueControlExceptionpublic String listScheduledMessagesAsJSON() throws Exception
JMSQueueControllistScheduledMessagesAsJSON in interface JMSQueueControlExceptionpublic Map<String,Map<String,Object>[]> listDeliveringMessages() throws Exception
JMSQueueControlMap<String,Object>[] same way is returned by JMSQueueControl.listScheduledMessages()listDeliveringMessages in interface JMSQueueControlExceptionpublic String listDeliveringMessagesAsJSON() throws Exception
JMSQueueControlJMSQueueControl.listDeliveringMessages() to JSONlistDeliveringMessagesAsJSON in interface JMSQueueControlExceptionpublic String listMessagesAsJSON(String filter) throws Exception
JMSQueueControlnull or an empty filter will list all messages from this queue.listMessagesAsJSON in interface JMSQueueControlExceptionpublic long countMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will count all messages from this queue.countMessages in interface JMSQueueControlExceptionpublic boolean expireMessage(String messageID) throws Exception
JMSQueueControlexpireMessage in interface JMSQueueControltrue if the message was expired, false elseExceptionpublic int expireMessages(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will expire all messages from this queue.expireMessages in interface JMSQueueControlExceptionpublic boolean sendMessageToDeadLetterAddress(String messageID) throws Exception
JMSQueueControlsendMessageToDeadLetterAddress in interface JMSQueueControltrue if the message was sent to the dead letter address, false elseExceptionpublic int sendMessagesToDeadLetterAddress(String filterStr) throws Exception
JMSQueueControlnull or an empty filter will send all messages from this queue.sendMessagesToDeadLetterAddress in interface JMSQueueControlExceptionpublic String sendTextMessageWithProperties(String properties) throws Exception
JMSQueueControlsendTextMessageWithProperties in interface JMSQueueControlproperties - the message properties to set as a comma sep name=value list. Can only
contain Strings maped to primitive types or JMS properties. eg: body=hi,JMSReplyTo=Queue2Exceptionpublic String sendTextMessage(String body) throws Exception
JMSQueueControlsendTextMessage in interface JMSQueueControlbody - the text to sendExceptionpublic String sendTextMessage(Map<String,String> headers, String body) throws Exception
JMSQueueControlsendTextMessage in interface JMSQueueControlheaders - the message headers and properties to set. Can only
container Strings maped to primitive types.body - the text to sendExceptionpublic String sendTextMessage(String body, String user, String password) throws Exception
JMSQueueControlsendTextMessage in interface JMSQueueControlbody - the text to sendExceptionpublic String sendTextMessage(Map<String,String> headers, String body, String user, String password) throws Exception
sendTextMessage in interface JMSQueueControlheaders - the message headers and properties to set. Can only
container Strings maped to primitive types.body - the text to sendExceptionpublic boolean changeMessagePriority(String messageID, int newPriority) throws Exception
JMSQueueControlchangeMessagePriority in interface JMSQueueControlnewPriority - between 0 and 9 inclusive.true if the message priority was changedExceptionpublic int changeMessagesPriority(String filterStr, int newPriority) throws Exception
JMSQueueControlnull or an empty filter will change all messages from this queue.changeMessagesPriority in interface JMSQueueControlExceptionpublic boolean retryMessage(String jmsMessageID) throws Exception
JMSQueueControlretryMessage in interface JMSQueueControltrue if the message was retried, false elseExceptionpublic int retryMessages()
throws Exception
JMSQueueControlretryMessages in interface JMSQueueControlExceptionpublic boolean moveMessage(String messageID, String otherQueueName) throws Exception
JMSQueueControlmoveMessage in interface JMSQueueControltrue if the message was moved, false elseExceptionpublic boolean moveMessage(String messageID, String otherQueueName, boolean rejectDuplicates) throws Exception
JMSQueueControlmoveMessage in interface JMSQueueControltrue if the message was moved, false elseExceptionpublic int moveMessages(String filterStr, String otherQueueName, boolean rejectDuplicates) throws Exception
JMSQueueControlnull or an empty filter will move all messages from this queue.moveMessages in interface JMSQueueControlExceptionpublic int moveMessages(String filterStr, String otherQueueName) throws Exception
JMSQueueControlnull or an empty filter will move all messages from this queue.moveMessages in interface JMSQueueControlExceptionpublic String listConsumersAsJSON() throws Exception
listConsumersAsJSON in interface JMSQueueControlExceptionpublic String listMessageCounter()
JMSQueueControllistMessageCounter in interface JMSQueueControlpublic void resetMessageCounter()
throws Exception
JMSQueueControlresetMessageCounter in interface JMSQueueControlExceptionpublic String listMessageCounterAsHTML()
JMSQueueControllistMessageCounterAsHTML in interface JMSQueueControlpublic String listMessageCounterHistory() throws Exception
JMSQueueControllistMessageCounterHistory in interface JMSQueueControlExceptionpublic String listMessageCounterHistoryAsHTML()
JMSQueueControllistMessageCounterHistoryAsHTML in interface JMSQueueControlpublic boolean isPaused()
throws Exception
JMSQueueControlisPaused in interface JMSQueueControlExceptionpublic void pause()
throws Exception
JMSQueueControlpause in interface JMSQueueControlExceptionpublic void pause(boolean persist)
throws Exception
JMSQueueControlpause in interface JMSQueueControlExceptionpublic void resume()
throws Exception
JMSQueueControlresume in interface JMSQueueControlExceptionpublic CompositeData[] browse() throws Exception
JMSQueueControlbrowse in interface JMSQueueControlExceptionpublic CompositeData[] browse(String filter) throws Exception
JMSQueueControlbrowse in interface JMSQueueControlExceptionpublic String getSelector()
JMSQueueControlgetSelector in interface JMSQueueControlpublic void flushExecutor()
JMSQueueControlflushExecutor in interface JMSQueueControlpublic MBeanInfo getMBeanInfo()
getMBeanInfo in interface DynamicMBeangetMBeanInfo in class StandardMBeanCopyright © 2018 The Apache Software Foundation. All rights reserved.