Package org.apache.activemq.broker.jmx
Class DestinationView
java.lang.Object
org.apache.activemq.broker.jmx.DestinationView
- All Implemented Interfaces:
DestinationViewMBean
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbrowse()browseAsTable(String selector) Browses the current destination returning a list of messagesbrowseMessages(String selector) Browses the current destination with the given selector returning a list of messagesvoidgc()doubledoublelonglonglonglongReturns the number of consumers subscribed this destination.longReturns the number of messages that have been acknowledged from the destination.longlonglonglongReturns the number of messages that have been delivered (potentially not acknowledged) to consumers.longReturns the number of duplicate messages that have been paged-in from the store.longReturns the number of messages that have been sent to the destination.longlonglongReturns the number of messages that have expiredlongReturns the number of messages that have been acknowledged by network subscriptions from the destination.longReturns the number of messages that have been dispatched but not acknowledgedintlonglongintintlonglongintlongfloatlonglonglonggetName()Returns the name of this destinationlonglonglonglongReturns the number of messages in this destination which are yet to be consumedReturns the slow consumer strategy MBean for this destinationlongReturns the memory size of all messages in this destination's storeReturns all the current subscription MBeans matching this destinationlongintlongbooleanbooleanbooleanbooleanisDLQ()booleanbooleanbooleanbooleanReturns the config setting to send a duplicate message from store to the dead letter queue.booleanvoidResets the management counters.sendTextMessage(String body) Sends a TextMesage to the destination.sendTextMessage(String body, String user, String password) Sends a TextMesage to the destination.sendTextMessage(Map headers, String body) Sends a TextMesage to the destination.sendTextMessageWithProperties(String properties) Sends a TextMessage to the destination.sendTextMessageWithProperties(String properties, String delimiter) Sends a TextMessage to the destination.voidsetAdvancedMessageStatisticsEnabled(boolean advancedMessageStatisticsEnabled) voidsetAdvancedNetworkStatisticsEnabled(boolean advancedNetworkStatisticsEnabled) 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 val) voidsetEnableAudit(boolean enableAudit) 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)
-
Field Details
-
destination
-
broker
-
-
Constructor Details
-
DestinationView
-
-
Method Details
-
gc
public void gc() -
getName
Description copied from interface:DestinationViewMBeanReturns the name of this destination- Specified by:
getNamein interfaceDestinationViewMBean
-
resetStatistics
public void resetStatistics()Description copied from interface:DestinationViewMBeanResets the management counters.- Specified by:
resetStatisticsin interfaceDestinationViewMBean
-
getEnqueueCount
public long getEnqueueCount()Description copied from interface:DestinationViewMBeanReturns the number of messages that have been sent to the destination.- Specified by:
getEnqueueCountin interfaceDestinationViewMBean- Returns:
- The number of messages that have been sent to the destination.
-
getDequeueCount
public long getDequeueCount()Description copied from interface:DestinationViewMBeanReturns the number of messages that have been acknowledged from the destination.- Specified by:
getDequeueCountin interfaceDestinationViewMBean- Returns:
- The number of messages that have been acknowledged from the destination.
-
getForwardCount
public long getForwardCount()Description copied from interface:DestinationViewMBeanReturns the number of messages that have been acknowledged by network subscriptions from the destination.- Specified by:
getForwardCountin interfaceDestinationViewMBean- Returns:
- The number of messages that have been acknowledged by network subscriptions from the destination.
-
getDispatchCount
public long getDispatchCount()Description copied from interface:DestinationViewMBeanReturns the number of messages that have been delivered (potentially not acknowledged) to consumers.- Specified by:
getDispatchCountin interfaceDestinationViewMBean- Returns:
- The number of messages that have been delivered (potentially not acknowledged) to consumers.
-
getDuplicateFromStoreCount
public long getDuplicateFromStoreCount()Description copied from interface:DestinationViewMBeanReturns the number of duplicate messages that have been paged-in from the store.- Specified by:
getDuplicateFromStoreCountin interfaceDestinationViewMBean- Returns:
- The number of duplicate messages that have been paged-in from the store.
-
getInFlightCount
public long getInFlightCount()Description copied from interface:DestinationViewMBeanReturns the number of messages that have been dispatched but not acknowledged- Specified by:
getInFlightCountin interfaceDestinationViewMBean- Returns:
- The number of messages that have been dispatched but not acknowledged
-
getExpiredCount
public long getExpiredCount()Description copied from interface:DestinationViewMBeanReturns the number of messages that have expired- Specified by:
getExpiredCountin interfaceDestinationViewMBean- Returns:
- The number of messages that have expired
-
getConsumerCount
public long getConsumerCount()Description copied from interface:DestinationViewMBeanReturns the number of consumers subscribed this destination.- Specified by:
getConsumerCountin interfaceDestinationViewMBean- Returns:
- The number of consumers subscribed this destination.
-
getQueueSize
public long getQueueSize()Description copied from interface:DestinationViewMBeanReturns the number of messages in this destination which are yet to be consumed- Specified by:
getQueueSizein interfaceDestinationViewMBean- Returns:
- Returns the number of messages in this destination which are yet to be consumed
-
getStoreMessageSize
public long getStoreMessageSize()Description copied from interface:DestinationViewMBeanReturns the memory size of all messages in this destination's store- Specified by:
getStoreMessageSizein interfaceDestinationViewMBean- Returns:
- Returns the memory size of all messages in this destination's store
-
getMessagesCached
public long getMessagesCached() -
getMemoryPercentUsage
public int getMemoryPercentUsage()- Specified by:
getMemoryPercentUsagein interfaceDestinationViewMBean- Returns:
- the percentage of amount of memory used
-
getMemoryUsageByteCount
public long getMemoryUsageByteCount()- Specified by:
getMemoryUsageByteCountin interfaceDestinationViewMBean- Returns:
- the amount of memory currently used by this destination
-
getMemoryLimit
public long getMemoryLimit()- Specified by:
getMemoryLimitin interfaceDestinationViewMBean- Returns:
- the amount of memory allocated to this destination
-
setMemoryLimit
public void setMemoryLimit(long limit) Description copied from interface:DestinationViewMBeanset the amount of memory allocated to this destination- Specified by:
setMemoryLimitin interfaceDestinationViewMBean
-
getAverageEnqueueTime
public double getAverageEnqueueTime()- Specified by:
getAverageEnqueueTimein interfaceDestinationViewMBean
-
getTempUsagePercentUsage
public int getTempUsagePercentUsage()- Specified by:
getTempUsagePercentUsagein interfaceDestinationViewMBean- Returns:
- the percentage of amount of temp usage used
-
getTempUsageLimit
public long getTempUsageLimit()- Specified by:
getTempUsageLimitin interfaceDestinationViewMBean- Returns:
- the amount of temp usage allocated to this destination
-
setTempUsageLimit
public void setTempUsageLimit(long limit) Description copied from interface:DestinationViewMBeanset the amount of temp usage allocated to this destination- Specified by:
setTempUsageLimitin interfaceDestinationViewMBean- Parameters:
limit- the amount of temp usage allocated to this destination
-
getMaxEnqueueTime
public long getMaxEnqueueTime()- Specified by:
getMaxEnqueueTimein interfaceDestinationViewMBean- Returns:
- longest time a message is held by a destination
-
getMinEnqueueTime
public long getMinEnqueueTime()- Specified by:
getMinEnqueueTimein interfaceDestinationViewMBean- Returns:
- shortest time a message is held by a destination
-
getAverageMessageSize
public long getAverageMessageSize()- Specified by:
getAverageMessageSizein interfaceDestinationViewMBean- Returns:
- the average size of a message (bytes)
-
getMaxMessageSize
public long getMaxMessageSize()- Specified by:
getMaxMessageSizein interfaceDestinationViewMBean- Returns:
- the max size of a message (bytes)
-
getMinMessageSize
public long getMinMessageSize()- Specified by:
getMinMessageSizein interfaceDestinationViewMBean- Returns:
- the min size of a message (bytes)
-
isPrioritizedMessages
public boolean isPrioritizedMessages()- Specified by:
isPrioritizedMessagesin interfaceDestinationViewMBean- Returns:
- true if prioritized messages are enabled for the destination
-
browse
- Specified by:
browsein interfaceDestinationViewMBean- Returns:
- An array of all the messages in the destination's queue.
- Throws:
OpenDataException
-
browse
public CompositeData[] browse(String selector) throws OpenDataException, jakarta.jms.InvalidSelectorException - Specified by:
browsein interfaceDestinationViewMBean- Returns:
- An array of all the messages in the destination's queue.
- Throws:
jakarta.jms.InvalidSelectorExceptionOpenDataException
-
browseMessages
Browses the current destination returning a list of messages- Specified by:
browseMessagesin interfaceDestinationViewMBean- Throws:
jakarta.jms.InvalidSelectorException
-
browseMessages
Browses the current destination with the given selector returning a list of messages- Specified by:
browseMessagesin interfaceDestinationViewMBean- Throws:
jakarta.jms.InvalidSelectorException
-
browseAsTable
- Specified by:
browseAsTablein interfaceDestinationViewMBean- Returns:
- A list of all the messages in the destination's queue.
- Throws:
OpenDataException
-
browseAsTable
public TabularData browseAsTable(String selector) throws OpenDataException, jakarta.jms.InvalidSelectorException - Specified by:
browseAsTablein interfaceDestinationViewMBean- Returns:
- A list of all the messages in the destination's queue.
- Throws:
jakarta.jms.InvalidSelectorExceptionOpenDataException
-
sendTextMessageWithProperties
Description copied from interface:DestinationViewMBeanSends a TextMessage to the destination.- Specified by:
sendTextMessageWithPropertiesin interfaceDestinationViewMBean- 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
Description copied from interface:DestinationViewMBeanSends a TextMessage to the destination.- Specified by:
sendTextMessageWithPropertiesin interfaceDestinationViewMBean- 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
Description copied from interface:DestinationViewMBeanSends a TextMesage to the destination.- Specified by:
sendTextMessagein interfaceDestinationViewMBean- Parameters:
body- the text to send- Returns:
- the message id of the message sent.
- Throws:
Exception
-
sendTextMessage
Description copied from interface:DestinationViewMBeanSends a TextMesage to the destination.- Specified by:
sendTextMessagein interfaceDestinationViewMBean- 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
Description copied from interface:DestinationViewMBeanSends a TextMesage to the destination.- Specified by:
sendTextMessagein interfaceDestinationViewMBean- Parameters:
body- the text to send- Returns:
- a string value
- Throws:
Exception
-
sendTextMessage
public String sendTextMessage(Map<String, String> headers, String body, String userName, String password) throws Exception- Specified by:
sendTextMessagein interfaceDestinationViewMBean- Parameters:
headers- the message headers and properties to set. Can only container Strings maped to primitive types.body- the text to send- Returns:
- a string value
- Throws:
Exception
-
getMaxAuditDepth
public int getMaxAuditDepth()- Specified by:
getMaxAuditDepthin interfaceDestinationViewMBean- Returns:
- the maxAuditDepth
-
getMaxProducersToAudit
public int getMaxProducersToAudit()- Specified by:
getMaxProducersToAuditin interfaceDestinationViewMBean- Returns:
- the maxProducersToAudit
-
isEnableAudit
public boolean isEnableAudit() -
setEnableAudit
public void setEnableAudit(boolean enableAudit) -
setMaxAuditDepth
public void setMaxAuditDepth(int maxAuditDepth) - Specified by:
setMaxAuditDepthin interfaceDestinationViewMBean- Parameters:
maxAuditDepth- the maxAuditDepth to set
-
setMaxProducersToAudit
public void setMaxProducersToAudit(int maxProducersToAudit) - Specified by:
setMaxProducersToAuditin interfaceDestinationViewMBean- Parameters:
maxProducersToAudit- the maxProducersToAudit to set
-
getMemoryUsagePortion
public float getMemoryUsagePortion()- Specified by:
getMemoryUsagePortionin interfaceDestinationViewMBean- Returns:
- the portion of memory from the broker memory limit for this destination
-
getProducerCount
public long getProducerCount()- Specified by:
getProducerCountin interfaceDestinationViewMBean- Returns:
- the number of producers publishing to the destination
-
isProducerFlowControl
public boolean isProducerFlowControl()- Specified by:
isProducerFlowControlin interfaceDestinationViewMBean- Returns:
- the producerFlowControl
-
setMemoryUsagePortion
public void setMemoryUsagePortion(float value) Description copied from interface:DestinationViewMBeanset the portion of memory from the broker memory limit for this destination- Specified by:
setMemoryUsagePortionin interfaceDestinationViewMBean
-
setProducerFlowControl
public void setProducerFlowControl(boolean producerFlowControl) - Specified by:
setProducerFlowControlin interfaceDestinationViewMBean- Parameters:
producerFlowControl- the producerFlowControl to set
-
isAlwaysRetroactive
public boolean isAlwaysRetroactive()- Specified by:
isAlwaysRetroactivein interfaceDestinationViewMBean- Returns:
- if we treat consumers as alwaysRetroactive
-
setAlwaysRetroactive
public void setAlwaysRetroactive(boolean alwaysRetroactive) - Specified by:
setAlwaysRetroactivein interfaceDestinationViewMBean- Parameters:
alwaysRetroactive- set as always retroActive
-
setBlockedProducerWarningInterval
public 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- Specified by:
setBlockedProducerWarningIntervalin interfaceDestinationViewMBean- Parameters:
blockedProducerWarningInterval- the interval at which warning about blocked producers will be triggered.
-
getBlockedProducerWarningInterval
public long getBlockedProducerWarningInterval()- Specified by:
getBlockedProducerWarningIntervalin interfaceDestinationViewMBean- Returns:
- the interval at which warning about blocked producers will be triggered.
-
getMaxPageSize
public int getMaxPageSize()- Specified by:
getMaxPageSizein interfaceDestinationViewMBean- Returns:
- the maximum number of message to be paged into the destination
-
setMaxPageSize
public void setMaxPageSize(int pageSize) - Specified by:
setMaxPageSizein interfaceDestinationViewMBean- Parameters:
pageSize- Set the maximum number of messages to page into the destination
-
isUseCache
public boolean isUseCache()- Specified by:
isUseCachein interfaceDestinationViewMBean- Returns:
- true if caching is allowed of for the destination
-
setUseCache
public void setUseCache(boolean value) - Specified by:
setUseCachein interfaceDestinationViewMBean- Parameters:
value- enable/disable caching on the destination
-
getSubscriptions
Description copied from interface:DestinationViewMBeanReturns all the current subscription MBeans matching this destination- Specified by:
getSubscriptionsin interfaceDestinationViewMBean- Returns:
- the names of the subscriptions for this destination
- Throws:
IOExceptionMalformedObjectNameException
-
getSlowConsumerStrategy
Description copied from interface:DestinationViewMBeanReturns the slow consumer strategy MBean for this destination- Specified by:
getSlowConsumerStrategyin interfaceDestinationViewMBean- Returns:
- the name of the slow consumer handler MBean for this destination
- Throws:
IOExceptionMalformedObjectNameException
-
getOptions
- Specified by:
getOptionsin interfaceDestinationViewMBean- Returns:
- A string of destination options, name value pairs as URL queryString.
-
isDLQ
public boolean isDLQ()- Specified by:
isDLQin interfaceDestinationViewMBean- Returns:
- true if this is dead letter queue
-
setDLQ
public void setDLQ(boolean val) - Specified by:
setDLQin interfaceDestinationViewMBean- Parameters:
val- enable/disable the DLQ flag
-
getBlockedSends
public long getBlockedSends()- Specified by:
getBlockedSendsin interfaceDestinationViewMBean
-
getAverageBlockedTime
public double getAverageBlockedTime()- Specified by:
getAverageBlockedTimein interfaceDestinationViewMBean
-
getTotalBlockedTime
public long getTotalBlockedTime()- Specified by:
getTotalBlockedTimein interfaceDestinationViewMBean
-
isSendDuplicateFromStoreToDLQ
public boolean isSendDuplicateFromStoreToDLQ()Description copied from interface:DestinationViewMBeanReturns the config setting to send a duplicate message from store to the dead letter queue.- Specified by:
isSendDuplicateFromStoreToDLQin interfaceDestinationViewMBean- Returns:
- The config setting to send a duplicate message from store to the dead letter queue.
-
getMaxUncommittedExceededCount
public long getMaxUncommittedExceededCount()- Specified by:
getMaxUncommittedExceededCountin interfaceDestinationViewMBean
-
isAdvancedNetworkStatisticsEnabled
public boolean isAdvancedNetworkStatisticsEnabled()- Specified by:
isAdvancedNetworkStatisticsEnabledin interfaceDestinationViewMBean
-
setAdvancedNetworkStatisticsEnabled
public void setAdvancedNetworkStatisticsEnabled(boolean advancedNetworkStatisticsEnabled) - Specified by:
setAdvancedNetworkStatisticsEnabledin interfaceDestinationViewMBean
-
getNetworkEnqueues
public long getNetworkEnqueues()- Specified by:
getNetworkEnqueuesin interfaceDestinationViewMBean
-
getNetworkDequeues
public long getNetworkDequeues()- Specified by:
getNetworkDequeuesin interfaceDestinationViewMBean
-
isAdvancedMessageStatisticsEnabled
public boolean isAdvancedMessageStatisticsEnabled()- Specified by:
isAdvancedMessageStatisticsEnabledin interfaceDestinationViewMBean
-
setAdvancedMessageStatisticsEnabled
public void setAdvancedMessageStatisticsEnabled(boolean advancedMessageStatisticsEnabled) - Specified by:
setAdvancedMessageStatisticsEnabledin interfaceDestinationViewMBean
-
getEnqueuedMessageBrokerInTime
public long getEnqueuedMessageBrokerInTime()- Specified by:
getEnqueuedMessageBrokerInTimein interfaceDestinationViewMBean
-
getEnqueuedMessageClientId
- Specified by:
getEnqueuedMessageClientIdin interfaceDestinationViewMBean
-
getEnqueuedMessageId
- Specified by:
getEnqueuedMessageIdin interfaceDestinationViewMBean
-
getEnqueuedMessageTimestamp
public long getEnqueuedMessageTimestamp()- Specified by:
getEnqueuedMessageTimestampin interfaceDestinationViewMBean
-
getDequeuedMessageBrokerInTime
public long getDequeuedMessageBrokerInTime()- Specified by:
getDequeuedMessageBrokerInTimein interfaceDestinationViewMBean
-
getDequeuedMessageBrokerOutTime
public long getDequeuedMessageBrokerOutTime()- Specified by:
getDequeuedMessageBrokerOutTimein interfaceDestinationViewMBean
-
getDequeuedMessageClientId
- Specified by:
getDequeuedMessageClientIdin interfaceDestinationViewMBean
-
getDequeuedMessageId
- Specified by:
getDequeuedMessageIdin interfaceDestinationViewMBean
-
getDequeuedMessageTimestamp
public long getDequeuedMessageTimestamp()- Specified by:
getDequeuedMessageTimestampin interfaceDestinationViewMBean
-