public interface Subscription extends SubscriptionRecovery
| Modifier and Type | Method and Description |
|---|---|
void |
acknowledge(ConnectionContext context,
org.apache.activemq.command.MessageAck ack)
Used when client acknowledge receipt of dispatched message.
|
void |
add(ConnectionContext context,
Destination destination)
The subscription will be receiving messages from the destination.
|
void |
add(org.apache.activemq.broker.region.MessageReference node)
Used to add messages that match the subscription.
|
int |
countBeforeFull() |
void |
destroy()
Called when the subscription is destroyed.
|
void |
gc()
The subscription should release as may references as it can to help the garbage collector
reclaim memory.
|
long |
getConsumedCount() |
org.apache.activemq.command.ConsumerInfo |
getConsumerInfo()
The ConsumerInfo object that created the subscription.
|
ConnectionContext |
getContext() |
int |
getCursorMemoryHighWaterMark() |
long |
getDequeueCounter() |
long |
getDispatchedCounter() |
int |
getDispatchedQueueSize() |
long |
getEnqueueCounter() |
long |
getInFlightMessageSize() |
int |
getInFlightSize() |
int |
getInFlightUsage() |
ObjectName |
getObjectName() |
long |
getPendingMessageSize() |
int |
getPendingQueueSize() |
int |
getPrefetchSize() |
String |
getSelector() |
SubscriptionStatistics |
getSubscriptionStatistics() |
long |
getTimeOfLastMessageAck()
Returns the time since the last Ack message was received by this subscription.
|
void |
incrementConsumedCount() |
boolean |
isBrowser() |
boolean |
isFull() |
boolean |
isHighWaterMark() |
boolean |
isLowWaterMark() |
boolean |
isRecoveryRequired()
Informs the Broker if the subscription needs to intervention to recover it's state
e.g.
|
boolean |
isSlowConsumer() |
boolean |
isWildcard()
Returns true if this subscription is a Wildcard subscription.
|
boolean |
matches(org.apache.activemq.command.ActiveMQDestination destination)
Is the subscription interested in messages in the destination?
|
boolean |
matches(org.apache.activemq.broker.region.MessageReference node,
org.apache.activemq.filter.MessageEvaluationContext context)
Is the subscription interested in the message?
|
void |
processMessageDispatchNotification(org.apache.activemq.command.MessageDispatchNotification mdn)
Used by a Slave Broker to update dispatch infomation
|
org.apache.activemq.command.Response |
pullMessage(ConnectionContext context,
org.apache.activemq.command.MessagePull pull)
Allows a consumer to pull a message on demand
|
List<org.apache.activemq.broker.region.MessageReference> |
remove(ConnectionContext context,
Destination destination)
The subscription will be no longer be receiving messages from the destination.
|
void |
resetConsumedCount() |
void |
setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark) |
void |
setObjectName(ObjectName objectName)
Set when the subscription is registered in JMX
|
void |
setSelector(String selector)
Attempts to change the current active selector on the subscription.
|
void |
unmatched(org.apache.activemq.broker.region.MessageReference node) |
void |
updateConsumerPrefetch(int newPrefetch)
inform the MessageConsumer on the client to change it's prefetch
|
addRecoveredMessage, getActiveMQDestinationvoid add(org.apache.activemq.broker.region.MessageReference node) throws Exception
node - ExceptionInterruptedExceptionIOExceptionvoid acknowledge(ConnectionContext context, org.apache.activemq.command.MessageAck ack) throws Exception
IOExceptionExceptionorg.apache.activemq.command.Response pullMessage(ConnectionContext context, org.apache.activemq.command.MessagePull pull) throws Exception
Exceptionboolean isWildcard()
boolean matches(org.apache.activemq.broker.region.MessageReference node, org.apache.activemq.filter.MessageEvaluationContext context) throws IOException
node - context - IOExceptionboolean matches(org.apache.activemq.command.ActiveMQDestination destination)
destination - void add(ConnectionContext context, Destination destination) throws Exception
context - destination - ExceptionList<org.apache.activemq.broker.region.MessageReference> remove(ConnectionContext context, Destination destination) throws Exception
context - destination - Exceptionorg.apache.activemq.command.ConsumerInfo getConsumerInfo()
void gc()
void processMessageDispatchNotification(org.apache.activemq.command.MessageDispatchNotification mdn) throws Exception
mdn - Exceptionint getPendingQueueSize()
long getPendingMessageSize()
int getDispatchedQueueSize()
long getDispatchedCounter()
long getEnqueueCounter()
long getDequeueCounter()
SubscriptionStatistics getSubscriptionStatistics()
String getSelector()
void setSelector(String selector) throws javax.jms.InvalidSelectorException, UnsupportedOperationException
javax.jms.InvalidSelectorExceptionUnsupportedOperationExceptionObjectName getObjectName()
void setObjectName(ObjectName objectName)
boolean isLowWaterMark()
boolean isHighWaterMark()
boolean isFull()
void updateConsumerPrefetch(int newPrefetch)
newPrefetch - void destroy()
int getPrefetchSize()
int getInFlightSize()
long getInFlightMessageSize()
int getInFlightUsage()
boolean isRecoveryRequired()
PendingMessageCursorboolean isBrowser()
int countBeforeFull()
ConnectionContext getContext()
int getCursorMemoryHighWaterMark()
void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)
boolean isSlowConsumer()
void unmatched(org.apache.activemq.broker.region.MessageReference node) throws IOException
IOExceptionlong getTimeOfLastMessageAck()
long getConsumedCount()
void incrementConsumedCount()
void resetConsumedCount()
Copyright © 2005–2020 The Apache Software Foundation. All rights reserved.