public class QueueMBean extends AMQManagedObject implements ManagedQueue, QueueNotificationListener
Modifier and Type | Class and Description |
---|---|
protected static class |
QueueMBean.GetMessageVisitor |
Modifier and Type | Field and Description |
---|---|
static String |
JMSTIMESTAMP_DATETIME_FORMAT
Date/time format used for message expiration and message timestamp formatting
|
ATTR_ACTIVE_CONSUMER_COUNT, ATTR_ALT_EXCHANGE, ATTR_AUTODELETE, ATTR_CAPACITY, ATTR_CONSUMER_COUNT, ATTR_DESCRIPTION, ATTR_DURABLE, ATTR_EXCLUSIVE, ATTR_FLOW_OVERFULL, ATTR_FLOW_RESUME_CAPACITY, ATTR_MAX_MSG_AGE, ATTR_MAX_MSG_COUNT, ATTR_MAX_MSG_SIZE, ATTR_MAX_QUEUE_DEPTH, ATTR_MAXIMUM_DELIVERY_COUNT, ATTR_MESSAGE_GROUP_KEY, ATTR_MSG_COUNT, ATTR_NAME, ATTR_OLDEST_MESSAGE_AGE, ATTR_OWNER, ATTR_QUEUE_DEPTH, ATTR_QUEUE_TYPE, ATTR_RCVD_MSG_COUNT, ATTR_SHARED_MESSAGE_GROUP, CONTENT, ENCODING, MIME, MSG_AMQ_ID, MSG_DELIVERY_COUNT, MSG_HEADER, MSG_QUEUE_POS, MSG_REDELIVERED, MSG_SIZE, QUEUE_ATTRIBUTES, TYPE, VIEW_MSG_CONTENT_COMPOSITE_ITEM_NAMES_DESC, VIEW_MSGS_COMPOSITE_ITEM_NAMES_DESC, VIEW_MSGS_TABULAR_UNIQUE_INDEX
DOMAIN
Constructor and Description |
---|
QueueMBean(Queue queue,
VirtualHostMBean virtualHostMBean) |
Modifier and Type | Method and Description |
---|---|
Long |
clearQueue()
Clears the queue by deleting all the messages from the queue that have not been acquired by consumers"
Since Qpid JMX API 1.3 this returns the number of messages deleted.
|
void |
copyMessages(long fromMessageId,
long toMessageId,
String toQueue)
Copies the messages in given range of AMQ message Ids to a given Queue.
|
void |
deleteMessageFromTop()
Deprecated.
|
void |
deleteMessages(long fromMessageId,
long toMessageId)
Deletes the messages in given range of AMQ message Ids in the given Queue.
|
Integer |
getActiveConsumerCount()
Returns the total number of active subscribers to the queue.
|
String |
getAlternateExchange()
Returns the name of the Alternate Exchange for the queue, or null if there isn't one.
|
Long |
getCapacity()
Returns the current flow control Capacity of the queue in bytes.
|
Integer |
getConsumerCount()
Returns the total number of subscribers to the queue.
|
String |
getDescription()
Gets the free text queue description.
|
Long |
getFlowResumeCapacity()
Returns the current flow control FlowResumeCapacity of the queue in bytes.
|
Integer |
getMaximumDeliveryCount()
Maximum number of times a message is permitted to be delivered or zero if not enforced.
|
Long |
getMaximumMessageAge()
Returns the maximum age of a message (expiration time) in milliseconds
|
Long |
getMaximumMessageCount()
Tells the maximum number of messages that can be stored in the queue.
|
Long |
getMaximumMessageSize()
Returns the maximum size of a message (in Bytes) allowed to be accepted by the
ManagedQueue.
|
Long |
getMaximumQueueDepth()
This is useful for setting notifications or taking required action if the size of messages
stored in the queue increases over this limit.
|
Integer |
getMessageCount()
Total number of messages on the queue, which are yet to be delivered to the consumer(s).
|
String |
getMessageGroupKey()
Gets the message group key
|
String |
getName()
Returns the Name of the ManagedQueue.
|
MBeanNotificationInfo[] |
getNotificationInfo()
returns Notifications sent by this MBean.
|
String |
getObjectInstanceName() |
Long |
getOldestMessageAge()
Gets the arrival time of the oldest message in the queue
|
String |
getOwner()
Tells the Owner of the ManagedQueue.
|
ManagedObject |
getParentObject() |
Long |
getQueueDepth()
Size of messages in the queue
Since Qpid JMX API 1.2 this operation returns in units of bytes.
|
String |
getQueueType()
Gets the queue type
|
Long |
getReceivedMessageCount()
Tells the total number of messages receieved by the queue since startup.
|
boolean |
isAutoDelete()
Tells if the ManagedQueue is set to AutoDelete.
|
boolean |
isDurable()
Tells whether this ManagedQueue is durable or not.
|
boolean |
isExclusive()
Returns whether the queue is exclusive or not.
|
boolean |
isFlowOverfull()
Indicates whether the Queue is currently considered overfull by the FlowControl system
|
boolean |
isMessageGroupSharedGroups()
Gets the message group key
|
void |
moveMessages(long fromMessageId,
long toMessageId,
String toQueue)
Moves the messages in given range of message Ids to given Queue.
|
void |
notifyClients(NotificationCheck notification,
Queue queue,
String notificationMsg) |
void |
setAlternateExchange(String exchangeName)
Sets the Alternate Exchange for the queue, for use in dead letter queue functionality.
|
void |
setCapacity(Long value)
Sets the Capacity in bytes above which flow is blocked.
|
void |
setDescription(String description)
Sets the free text queue description.
|
void |
setExclusive(boolean exclusive)
Sets whether the queue is exclusive or not.
|
void |
setFlowResumeCapacity(Long value)
Sets the FlowResumeCapacity in bytes below which flow resumes.
|
void |
setMaximumMessageAge(Long age)
Sets the maximum age of a message in milliseconds
|
void |
setMaximumMessageCount(Long value)
Sets the maximum number of messages allowed to be stored in the queue.
|
void |
setMaximumMessageSize(Long size)
Sets the maximum size of the message (in Bytes) that is allowed to be
accepted by the Queue.
|
void |
setMaximumQueueDepth(Long value)
Sets the maximum size of all the messages together, that can be stored
in the queue.
|
CompositeData |
viewMessageContent(long messageId)
Returns the content for the given AMQ Message ID.
|
TabularData |
viewMessages(int fromIndex,
int toIndex)
Deprecated.
|
TabularData |
viewMessages(long startPosition,
long endPosition)
Returns a subset (up to 2^31 messages at a time) of all the messages stored on the queue.
|
addNotificationListener, getBroadcaster, incrementAndGetSequenceNumber, removeNotificationListener
getHierarchicalName, getHierarchicalType, getManagementInterface, getMBeanInfo, getObjectName, getObjectNameForSingleInstanceMBean, getRegistry, getType, register, toString, unregister
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
public static final String JMSTIMESTAMP_DATETIME_FORMAT
public QueueMBean(Queue queue, VirtualHostMBean virtualHostMBean) throws JMException
JMException
public ManagedObject getParentObject()
getParentObject
in interface ManagedObject
getParentObject
in class DefaultManagedObject
public String getObjectInstanceName()
getObjectInstanceName
in interface ManagedObject
public String getName()
ManagedQueue
getName
in interface ManagedQueue
public Integer getMessageCount()
ManagedQueue
getMessageCount
in interface ManagedQueue
public Integer getMaximumDeliveryCount()
ManagedQueue
getMaximumDeliveryCount
in interface ManagedQueue
public Long getReceivedMessageCount()
ManagedQueue
getReceivedMessageCount
in interface ManagedQueue
public Long getQueueDepth()
ManagedQueue
getQueueDepth
in interface ManagedQueue
public Integer getActiveConsumerCount()
ManagedQueue
getActiveConsumerCount
in interface ManagedQueue
public Integer getConsumerCount()
ManagedQueue
getConsumerCount
in interface ManagedQueue
public String getOwner()
ManagedQueue
getOwner
in interface ManagedQueue
public String getQueueType()
ManagedQueue
getQueueType
in interface ManagedQueue
public boolean isDurable()
ManagedQueue
isDurable
in interface ManagedQueue
public boolean isAutoDelete()
ManagedQueue
isAutoDelete
in interface ManagedQueue
public Long getMaximumMessageAge()
ManagedQueue
getMaximumMessageAge
in interface ManagedQueue
public void setMaximumMessageAge(Long age)
ManagedQueue
setMaximumMessageAge
in interface ManagedQueue
age
- maximum age of message.public Long getMaximumMessageSize()
ManagedQueue
getMaximumMessageSize
in interface ManagedQueue
public void setMaximumMessageSize(Long size)
ManagedQueue
setMaximumMessageSize
in interface ManagedQueue
size
- maximum size of message.public Long getMaximumMessageCount()
ManagedQueue
getMaximumMessageCount
in interface ManagedQueue
public void setMaximumMessageCount(Long value)
ManagedQueue
setMaximumMessageCount
in interface ManagedQueue
value
- the maximum number of messages allowed to be stored in the queue.public Long getMaximumQueueDepth()
ManagedQueue
getMaximumQueueDepth
in interface ManagedQueue
public void setMaximumQueueDepth(Long value)
ManagedQueue
setMaximumQueueDepth
in interface ManagedQueue
public Long getCapacity()
ManagedQueue
getCapacity
in interface ManagedQueue
public void setCapacity(Long value)
ManagedQueue
setCapacity
in interface ManagedQueue
value
- the capacity in bytespublic Long getFlowResumeCapacity()
ManagedQueue
getFlowResumeCapacity
in interface ManagedQueue
public void setFlowResumeCapacity(Long value)
ManagedQueue
setFlowResumeCapacity
in interface ManagedQueue
value
- of the resume capacity in bytespublic boolean isFlowOverfull()
ManagedQueue
isFlowOverfull
in interface ManagedQueue
public boolean isExclusive()
ManagedQueue
isExclusive
in interface ManagedQueue
public void setExclusive(boolean exclusive)
ManagedQueue
setExclusive
in interface ManagedQueue
exclusive
- the capacity in bytespublic void setAlternateExchange(String exchangeName) throws OperationsException
ManagedQueue
setAlternateExchange
in interface ManagedQueue
exchangeName
- the name of the exchange to use. Specifying null or the empty string will clear the
alternate exchange.OperationsException
public String getAlternateExchange()
ManagedQueue
getAlternateExchange
in interface ManagedQueue
@Deprecated public TabularData viewMessages(int fromIndex, int toIndex) throws IOException, JMException
ManagedQueue
viewMessages
in interface ManagedQueue
IOException
JMException
public TabularData viewMessages(long startPosition, long endPosition) throws IOException, JMException
ManagedQueue
viewMessages
in interface ManagedQueue
IOException
JMException
public CompositeData viewMessageContent(long messageId) throws IOException, JMException
ManagedQueue
viewMessageContent
in interface ManagedQueue
IOException
JMException
@Deprecated public void deleteMessageFromTop() throws IOException, JMException
ManagedQueue
deleteMessageFromTop
in interface ManagedQueue
IOException
JMException
public Long clearQueue() throws IOException, JMException
ManagedQueue
clearQueue
in interface ManagedQueue
IOException
JMException
public void moveMessages(long fromMessageId, long toMessageId, String toQueue) throws IOException, JMException
ManagedQueue
moveMessages
in interface ManagedQueue
fromMessageId
- first in the range of message idstoMessageId
- last in the range of message idstoQueue
- where the messages are to be movedIOException
JMException
public void deleteMessages(long fromMessageId, long toMessageId) throws IOException, JMException
ManagedQueue
deleteMessages
in interface ManagedQueue
fromMessageId
- first in the range of message idstoMessageId
- last in the range of message idsIOException
JMException
public void copyMessages(long fromMessageId, long toMessageId, String toQueue) throws IOException, JMException
ManagedQueue
copyMessages
in interface ManagedQueue
fromMessageId
- first in the range of message idstoMessageId
- last in the range of message idstoQueue
- where the messages are to be copiedIOException
JMException
public void notifyClients(NotificationCheck notification, Queue queue, String notificationMsg)
notifyClients
in interface QueueNotificationListener
public MBeanNotificationInfo[] getNotificationInfo()
getNotificationInfo
in interface NotificationBroadcaster
getNotificationInfo
in class DefaultManagedObject
public String getDescription()
ManagedQueue
getDescription
in interface ManagedQueue
public void setDescription(String description)
ManagedQueue
setDescription
in interface ManagedQueue
public String getMessageGroupKey()
ManagedQueue
getMessageGroupKey
in interface ManagedQueue
public boolean isMessageGroupSharedGroups()
ManagedQueue
isMessageGroupSharedGroups
in interface ManagedQueue
public Long getOldestMessageAge()
ManagedQueue
getOldestMessageAge
in interface ManagedQueue
Copyright © 2006–2016 The Apache Software Foundation. All rights reserved.