public class DurableTopicSubscription extends PrefetchSubscription implements UsageListener
dequeueCounter, dispatchCounter, dispatched, dispatchLock, enqueueCounter, pending, pendingLock, prefetchExtension, scheduler, usageManager, usePrefetchExtensionbroker, context, destinationFilter, destinations, info| Constructor and Description |
|---|
DurableTopicSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info,
boolean keepDurableSubsActive) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
acknowledge(ConnectionContext context,
MessageAck ack,
MessageReference node)
Used during acknowledgment to remove the message.
|
void |
activate(SystemUsage memoryManager,
ConnectionContext context,
ConsumerInfo info,
RegionBroker regionBroker) |
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.
|
protected boolean |
canDispatch(MessageReference node)
Use when a matched message is about to be dispatched to the client.
|
protected MessageDispatch |
createMessageDispatch(MessageReference node,
Message message) |
void |
deactivate(boolean keepDurableSubsActive,
long lastDeliveredSequenceId) |
void |
destroy()
Release any references that we are holding.
|
void |
dispatchPending() |
protected void |
doAddRecoveredMessage(MessageReference message) |
void |
gc()
The subscription should release as may references as it can to help the garbage collector
reclaim memory.
|
long |
getOfflineTimestamp() |
int |
getPendingQueueSize() |
SubscriptionKey |
getSubscriptionKey() |
boolean |
isActive() |
protected boolean |
isDropped(MessageReference node) |
boolean |
isEmpty(Topic topic) |
boolean |
isFull()
Used to determine if the broker can dispatch to the consumer.
|
boolean |
isKeepDurableSubsActive() |
void |
onUsageChanged(Usage usage,
int oldPercentUsage,
int newPercentUsage) |
void |
removePending(MessageReference node) |
void |
setOfflineTimestamp(long timestamp) |
protected void |
setPendingBatchSize(PendingMessageCursor pending,
int numberToDispatch) |
void |
setSelector(String selector)
Attempts to change the current active selector on the subscription.
|
String |
toString() |
void |
unmatched(MessageReference node)
store will have a pending ack for all durables, irrespective of the
selector so we need to ack if node is un-matched
|
acknowledge, assertAckMatchesDispatched, countBeforeFull, dispatch, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, getPrefetchExtension, isHighWaterMark, isLowWaterMark, isRecoveryRequired, isUsePrefetchExtension, onDispatch, processMessageDispatchNotification, pullMessage, remove, remove, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPrefetchSize, setUsePrefetchExtension, updateConsumerPrefetchaddDestination, addRecoveredMessage, getActiveMQDestination, getConsumedCount, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getInFlightUsage, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, getTimeOfLastMessageAck, incrementConsumedCount, isBrowser, isSlowConsumer, isWildcard, matches, matches, removeDestination, resetConsumedCount, setCursorMemoryHighWaterMark, setObjectName, setSlowConsumer, setTimeOfLastMessageAckpublic DurableTopicSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info, boolean keepDurableSubsActive) throws JMSException
JMSExceptionpublic final boolean isActive()
public final long getOfflineTimestamp()
public void setOfflineTimestamp(long timestamp)
public boolean isFull()
PrefetchSubscriptionisFull in interface SubscriptionisFull in class PrefetchSubscriptionpublic void gc()
Subscriptiongc in interface Subscriptiongc in class AbstractSubscriptionpublic void unmatched(MessageReference node) throws IOException
unmatched in interface Subscriptionunmatched in class AbstractSubscriptionIOExceptionprotected void setPendingBatchSize(PendingMessageCursor pending, int numberToDispatch)
setPendingBatchSize in class PrefetchSubscriptionpublic void add(ConnectionContext context, Destination destination) throws Exception
Subscriptionadd in interface Subscriptionadd in class PrefetchSubscriptionExceptionpublic void activate(SystemUsage memoryManager, ConnectionContext context, ConsumerInfo info, RegionBroker regionBroker) throws Exception
Exceptionpublic void deactivate(boolean keepDurableSubsActive, long lastDeliveredSequenceId) throws Exception
Exceptionprotected MessageDispatch createMessageDispatch(MessageReference node, Message message)
createMessageDispatch in class PrefetchSubscriptionpublic void add(MessageReference node) throws Exception
Subscriptionadd in interface Subscriptionadd in class PrefetchSubscriptionExceptionInterruptedExceptionIOExceptionpublic void dispatchPending() throws IOException
dispatchPending in class PrefetchSubscriptionIOExceptionpublic void removePending(MessageReference node) throws IOException
IOExceptionprotected void doAddRecoveredMessage(MessageReference message) throws Exception
doAddRecoveredMessage in class AbstractSubscriptionExceptionpublic int getPendingQueueSize()
getPendingQueueSize in interface SubscriptiongetPendingQueueSize in class PrefetchSubscriptionpublic void setSelector(String selector) throws InvalidSelectorException
SubscriptionsetSelector in interface SubscriptionsetSelector in class AbstractSubscriptionInvalidSelectorExceptionprotected boolean canDispatch(MessageReference node)
PrefetchSubscriptioncanDispatch in class PrefetchSubscriptionprotected void acknowledge(ConnectionContext context, MessageAck ack, MessageReference node) throws IOException
PrefetchSubscriptionacknowledge in class PrefetchSubscriptionIOExceptionpublic SubscriptionKey getSubscriptionKey()
public void destroy()
destroy in interface Subscriptionpublic void onUsageChanged(Usage usage, int oldPercentUsage, int newPercentUsage)
onUsageChanged in interface UsageListenerprotected boolean isDropped(MessageReference node)
isDropped in class PrefetchSubscriptionpublic boolean isKeepDurableSubsActive()
Copyright © 2005–2015 FuseSource, Corp.. All rights reserved.