public interface Subscription extends SubscriptionRecovery
Modifier and Type | Method and Description |
---|---|
void |
acknowledge(ConnectionContext context,
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(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.
|
ConsumerInfo |
getConsumerInfo()
The ConsumerInfo object that created the subscription.
|
ConnectionContext |
getContext() |
int |
getCursorMemoryHighWaterMark() |
long |
getDequeueCounter() |
long |
getDispatchedCounter() |
int |
getDispatchedQueueSize() |
long |
getEnqueueCounter() |
int |
getInFlightSize() |
int |
getInFlightUsage() |
ObjectName |
getObjectName() |
int |
getPendingQueueSize() |
int |
getPrefetchSize() |
String |
getSelector() |
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 |
isSlave() |
boolean |
isSlowConsumer() |
boolean |
matches(ActiveMQDestination destination)
Is the subscription interested in messages in the destination?
|
boolean |
matches(MessageReference node,
MessageEvaluationContext context)
Is the subscription interested in the message?
|
void |
processMessageDispatchNotification(MessageDispatchNotification mdn)
Used by a Slave Broker to update dispatch infomation
|
Response |
pullMessage(ConnectionContext context,
MessagePull pull)
Allows a consumer to pull a message on demand
|
List<MessageReference> |
remove(ConnectionContext context,
Destination destination)
The subscription will be no longer be receiving messages from the destination.
|
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(MessageReference node) |
void |
updateConsumerPrefetch(int newPrefetch)
inform the MessageConsumer on the client to change it's prefetch
|
addRecoveredMessage, getActiveMQDestination
void add(MessageReference node) throws Exception
node
- Exception
InterruptedException
IOException
void acknowledge(ConnectionContext context, MessageAck ack) throws Exception
node
- IOException
Exception
Response pullMessage(ConnectionContext context, MessagePull pull) throws Exception
Exception
boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException
node
- context
- IOException
boolean matches(ActiveMQDestination destination)
context
- void add(ConnectionContext context, Destination destination) throws Exception
context
- destination
- Exception
List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception
context
- destination
- Exception
ConsumerInfo getConsumerInfo()
destination
- void gc()
void processMessageDispatchNotification(MessageDispatchNotification mdn) throws Exception
mdn
- Exception
boolean isSlave()
int getPendingQueueSize()
int getDispatchedQueueSize()
long getDispatchedCounter()
long getEnqueueCounter()
long getDequeueCounter()
String getSelector()
void setSelector(String selector) throws javax.jms.InvalidSelectorException, UnsupportedOperationException
javax.jms.InvalidSelectorException
UnsupportedOperationException
ObjectName getObjectName()
void setObjectName(ObjectName objectName)
boolean isLowWaterMark()
boolean isHighWaterMark()
boolean isFull()
void updateConsumerPrefetch(int newPrefetch)
newPrefetch
- void destroy()
int getPrefetchSize()
int getInFlightSize()
int getInFlightUsage()
boolean isRecoveryRequired()
org.apache.activemq.region.cursors.PendingMessageCursor
boolean isBrowser()
int countBeforeFull()
ConnectionContext getContext()
int getCursorMemoryHighWaterMark()
void setCursorMemoryHighWaterMark(int cursorMemoryHighWaterMark)
boolean isSlowConsumer()
void unmatched(MessageReference node) throws IOException
IOException
Copyright © 2005–2017 The Apache Software Foundation. All rights reserved.