Package org.apache.activemq.broker.jmx
Interface DestinationViewMBean
-
- All Known Subinterfaces:
QueueViewMBean,TopicViewMBean
- All Known Implementing Classes:
DestinationView,QueueView,TopicView
public interface DestinationViewMBean
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompositeData[]browse()CompositeData[]browse(String selector)TabularDatabrowseAsTable()TabularDatabrowseAsTable(String selector)List<?>browseMessages()Browses the current destination returning a list of messagesList<?>browseMessages(String selector)Browses the current destination with the given selector returning a list of messagesdoublegetAverageBlockedTime()doublegetAverageEnqueueTime()longgetAverageMessageSize()longgetBlockedProducerWarningInterval()longgetBlockedSends()longgetConsumerCount()Returns the number of consumers subscribed this destination.longgetDequeueCount()Returns the number of messages that have been acknowledged from the destination.longgetDispatchCount()Returns the number of messages that have been delivered (potentially not acknowledged) to consumers.longgetDuplicateFromStoreCount()Returns the number of duplicate messages that have been paged-in from the store.longgetEnqueueCount()Returns the number of messages that have been sent to the destination.longgetExpiredCount()Returns the number of messages that have expiredlonggetForwardCount()Returns the number of messages that have been acknowledged by network subscriptions from the destination.longgetInFlightCount()Returns the number of messages that have been dispatched but not acknowledgedintgetMaxAuditDepth()longgetMaxEnqueueTime()longgetMaxMessageSize()intgetMaxPageSize()intgetMaxProducersToAudit()longgetMemoryLimit()intgetMemoryPercentUsage()longgetMemoryUsageByteCount()floatgetMemoryUsagePortion()longgetMinEnqueueTime()longgetMinMessageSize()StringgetName()Returns the name of this destinationStringgetOptions()longgetProducerCount()longgetQueueSize()Returns the number of messages in this destination which are yet to be consumedObjectNamegetSlowConsumerStrategy()Returns the slow consumer strategy MBean for this destinationlonggetStoreMessageSize()Returns the memory size of all messages in this destination's storeObjectName[]getSubscriptions()Returns all the current subscription MBeans matching this destinationlonggetTempUsageLimit()intgetTempUsagePercentUsage()longgetTotalBlockedTime()booleanisAlwaysRetroactive()booleanisDLQ()booleanisPrioritizedMessages()booleanisProducerFlowControl()booleanisSendDuplicateFromStoreToDLQ()Returns the config setting to send a duplicate message from store to the dead letter queue.booleanisUseCache()voidresetStatistics()Resets the management counters.StringsendTextMessage(String body)Sends a TextMesage to the destination.StringsendTextMessage(String body, String user, String password)Sends a TextMesage to the destination.StringsendTextMessage(Map<?,?> headers, String body)Sends a TextMesage to the destination.StringsendTextMessage(Map<String,String> headers, String body, String user, String password)StringsendTextMessageWithProperties(String properties)Sends a TextMessage to the destination.StringsendTextMessageWithProperties(String properties, String delimiter)Sends a TextMessage to the destination.voidsetAlwaysRetroactive(boolean alwaysRetroactive)voidsetBlockedProducerWarningInterval(long blockedProducerWarningInterval)Set's the interval at which warnings about producers being blocked by resource usage will be triggered.voidsetDLQ(boolean value)voidsetMaxAuditDepth(int maxAuditDepth)voidsetMaxPageSize(int pageSize)voidsetMaxProducersToAudit(int maxProducersToAudit)voidsetMemoryLimit(long limit)set the amount of memory allocated to this destinationvoidsetMemoryUsagePortion(float value)set the portion of memory from the broker memory limit for this destinationvoidsetProducerFlowControl(boolean producerFlowControl)voidsetTempUsageLimit(long limit)set the amount of temp usage allocated to this destinationvoidsetUseCache(boolean value)
-
-
-
Method Detail
-
getName
String getName()
Returns the name of this destination
-
resetStatistics
void resetStatistics()
Resets the management counters.
-
getEnqueueCount
long getEnqueueCount()
Returns the number of messages that have been sent to the destination.- Returns:
- The number of messages that have been sent to the destination.
-
getDispatchCount
long getDispatchCount()
Returns the number of messages that have been delivered (potentially not acknowledged) to consumers.- Returns:
- The number of messages that have been delivered (potentially not acknowledged) to consumers.
-
getDequeueCount
long getDequeueCount()
Returns the number of messages that have been acknowledged from the destination.- Returns:
- The number of messages that have been acknowledged from the destination.
-
getDuplicateFromStoreCount
long getDuplicateFromStoreCount()
Returns the number of duplicate messages that have been paged-in from the store.- Returns:
- The number of duplicate messages that have been paged-in from the store.
-
isSendDuplicateFromStoreToDLQ
boolean isSendDuplicateFromStoreToDLQ()
Returns the config setting to send a duplicate message from store to the dead letter queue.- Returns:
- The config setting to send a duplicate message from store to the dead letter queue.
-
getForwardCount
long getForwardCount()
Returns the number of messages that have been acknowledged by network subscriptions from the destination.- Returns:
- The number of messages that have been acknowledged by network subscriptions from the destination.
-
getInFlightCount
long getInFlightCount()
Returns the number of messages that have been dispatched but not acknowledged- Returns:
- The number of messages that have been dispatched but not acknowledged
-
getExpiredCount
long getExpiredCount()
Returns the number of messages that have expired- Returns:
- The number of messages that have expired
-
getConsumerCount
long getConsumerCount()
Returns the number of consumers subscribed this destination.- Returns:
- The number of consumers subscribed this destination.
-
getProducerCount
long getProducerCount()
- Returns:
- the number of producers publishing to the destination
-
getQueueSize
long getQueueSize()
Returns the number of messages in this destination which are yet to be consumed- Returns:
- Returns the number of messages in this destination which are yet to be consumed
-
getStoreMessageSize
long getStoreMessageSize()
Returns the memory size of all messages in this destination's store- Returns:
- Returns the memory size of all messages in this destination's store
-
browse
CompositeData[] browse() throws OpenDataException
- Returns:
- An array of all the messages in the destination's queue.
- Throws:
OpenDataException
-
browseAsTable
TabularData browseAsTable() throws OpenDataException
- Returns:
- A list of all the messages in the destination's queue.
- Throws:
OpenDataException
-
browse
CompositeData[] browse(String selector) throws OpenDataException, InvalidSelectorException
- Returns:
- An array of all the messages in the destination's queue.
- Throws:
InvalidSelectorExceptionOpenDataException
-
browseAsTable
TabularData browseAsTable(String selector) throws OpenDataException, InvalidSelectorException
- Returns:
- A list of all the messages in the destination's queue.
- Throws:
InvalidSelectorExceptionOpenDataException
-
sendTextMessage
String sendTextMessage(String body) throws Exception
Sends a TextMesage to the destination.- Parameters:
body- the text to send- Returns:
- the message id of the message sent.
- Throws:
Exception
-
sendTextMessageWithProperties
String sendTextMessageWithProperties(String properties) throws Exception
Sends a TextMessage to the destination.- Parameters:
properties- the message properties to set as name=value list separated by a comma. Can only contain Strings mapped to primitive types or JMS properties. eg: body=hi,JMSReplyTo=Queue2- Returns:
- the message id of the message sent.
- Throws:
Exception
-
sendTextMessageWithProperties
String sendTextMessageWithProperties(String properties, String delimiter) throws Exception
Sends a TextMessage to the destination.- Parameters:
properties- the message properties to set as name=value list separated by a custom delimiter. Can only contain Strings mapped to primitive types or JMS properties. eg: body=hi,JMSReplyTo=Queue2delimiter- The delimiter that separates each property. Defaults to comma if none is provided.- Returns:
- the message id of the message sent.
- Throws:
Exception
-
sendTextMessage
String sendTextMessage(Map<?,?> headers, String body) throws Exception
Sends a TextMesage to the destination.- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to send- Returns:
- the message id of the message sent.
- Throws:
Exception
-
sendTextMessage
String sendTextMessage(String body, String user, String password) throws Exception
Sends a TextMesage to the destination.- Parameters:
body- the text to senduser-password-- Returns:
- a string value
- Throws:
Exception
-
sendTextMessage
String sendTextMessage(Map<String,String> headers, String body, String user, String password) throws Exception
- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to senduser-password-- Returns:
- a string value
- Throws:
Exception
-
getMemoryPercentUsage
int getMemoryPercentUsage()
- Returns:
- the percentage of amount of memory used
-
getMemoryUsageByteCount
long getMemoryUsageByteCount()
- Returns:
- the amount of memory currently used by this destination
-
getMemoryLimit
long getMemoryLimit()
- Returns:
- the amount of memory allocated to this destination
-
setMemoryLimit
void setMemoryLimit(long limit)
set the amount of memory allocated to this destination- Parameters:
limit-
-
getTempUsagePercentUsage
int getTempUsagePercentUsage()
- Returns:
- the percentage of amount of temp usage used
-
getTempUsageLimit
long getTempUsageLimit()
- Returns:
- the amount of temp usage allocated to this destination
-
setTempUsageLimit
void setTempUsageLimit(long limit)
set the amount of temp usage allocated to this destination- Parameters:
limit- the amount of temp usage allocated to this destination
-
getMemoryUsagePortion
float getMemoryUsagePortion()
- Returns:
- the portion of memory from the broker memory limit for this destination
-
setMemoryUsagePortion
void setMemoryUsagePortion(float value)
set the portion of memory from the broker memory limit for this destination- Parameters:
value-
-
browseMessages
List<?> browseMessages() throws InvalidSelectorException
Browses the current destination returning a list of messages- Throws:
InvalidSelectorException
-
browseMessages
List<?> browseMessages(String selector) throws InvalidSelectorException
Browses the current destination with the given selector returning a list of messages- Throws:
InvalidSelectorException
-
getMaxEnqueueTime
long getMaxEnqueueTime()
- Returns:
- longest time a message is held by a destination
-
getMinEnqueueTime
long getMinEnqueueTime()
- Returns:
- shortest time a message is held by a destination
-
getAverageEnqueueTime
double getAverageEnqueueTime()
-
getAverageMessageSize
long getAverageMessageSize()
-
getMaxMessageSize
long getMaxMessageSize()
-
getMinMessageSize
long getMinMessageSize()
-
isProducerFlowControl
boolean isProducerFlowControl()
- Returns:
- the producerFlowControl
-
setProducerFlowControl
void setProducerFlowControl(boolean producerFlowControl)
- Parameters:
producerFlowControl- the producerFlowControl to set
-
isAlwaysRetroactive
boolean isAlwaysRetroactive()
- Returns:
- if we treat consumers as alwaysRetroactive
-
setAlwaysRetroactive
void setAlwaysRetroactive(boolean alwaysRetroactive)
- Parameters:
alwaysRetroactive- set as always retroActive
-
setBlockedProducerWarningInterval
void setBlockedProducerWarningInterval(long blockedProducerWarningInterval)
Set's the interval at which warnings about producers being blocked by resource usage will be triggered. Values of 0 or less will disable warnings- Parameters:
blockedProducerWarningInterval- the interval at which warning about blocked producers will be triggered.
-
getBlockedProducerWarningInterval
long getBlockedProducerWarningInterval()
- Returns:
- the interval at which warning about blocked producers will be triggered.
-
getMaxProducersToAudit
int getMaxProducersToAudit()
- Returns:
- the maxProducersToAudit
-
setMaxProducersToAudit
void setMaxProducersToAudit(int maxProducersToAudit)
- Parameters:
maxProducersToAudit- the maxProducersToAudit to set
-
getMaxAuditDepth
int getMaxAuditDepth()
- Returns:
- the maxAuditDepth
-
setMaxAuditDepth
void setMaxAuditDepth(int maxAuditDepth)
- Parameters:
maxAuditDepth- the maxAuditDepth to set
-
getMaxPageSize
int getMaxPageSize()
- Returns:
- the maximum number of message to be paged into the destination
-
setMaxPageSize
void setMaxPageSize(int pageSize)
- Parameters:
pageSize- Set the maximum number of messages to page into the destination
-
isUseCache
boolean isUseCache()
- Returns:
- true if caching is allowed of for the destination
-
isPrioritizedMessages
boolean isPrioritizedMessages()
- Returns:
- true if prioritized messages are enabled for the destination
-
setUseCache
void setUseCache(boolean value)
- Parameters:
value- enable/disable caching on the destination
-
getSubscriptions
ObjectName[] getSubscriptions() throws IOException, MalformedObjectNameException
Returns all the current subscription MBeans matching this destination- Returns:
- the names of the subscriptions for this destination
- Throws:
IOExceptionMalformedObjectNameException
-
getSlowConsumerStrategy
ObjectName getSlowConsumerStrategy() throws IOException, MalformedObjectNameException
Returns the slow consumer strategy MBean for this destination- Returns:
- the name of the slow consumer handler MBean for this destination
- Throws:
IOExceptionMalformedObjectNameException
-
getOptions
String getOptions()
- Returns:
- A string of destination options, name value pairs as URL queryString.
-
isDLQ
boolean isDLQ()
- Returns:
- true if this is dead letter queue
-
setDLQ
void setDLQ(boolean value)
- Parameters:
value- enable/disable the DLQ flag
-
getBlockedSends
long getBlockedSends()
-
getAverageBlockedTime
double getAverageBlockedTime()
-
getTotalBlockedTime
long getTotalBlockedTime()
-
-