Class QueueSubscription
java.lang.Object
org.apache.activemq.broker.region.AbstractSubscription
org.apache.activemq.broker.region.PrefetchSubscription
org.apache.activemq.broker.region.QueueSubscription
- All Implemented Interfaces:
LockOwner,Subscription,SubscriptionRecovery
- Direct Known Subclasses:
QueueBrowserSubscription
-
Field Summary
Fields inherited from class org.apache.activemq.broker.region.PrefetchSubscription
dispatched, dispatchLock, pending, pendingLock, scheduler, usageManagerFields inherited from class org.apache.activemq.broker.region.AbstractSubscription
broker, context, destinationFilter, destinations, info, prefetchExtensionFields inherited from interface org.apache.activemq.broker.region.LockOwner
HIGH_PRIORITY_LOCK_OWNER -
Constructor Summary
ConstructorsConstructorDescriptionQueueSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidacknowledge(ConnectionContext context, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference n) In the queue case, mark the node as dropped and then a gc cycle will remove it from the queue.protected booleancanDispatch(org.apache.activemq.broker.region.MessageReference n) Use when a matched message is about to be dispatched to the client.voiddestroy()Called when the subscription is destroyed.intprotected booleanisDropped(org.apache.activemq.broker.region.MessageReference node) booleantoString()Methods inherited from class org.apache.activemq.broker.region.PrefetchSubscription
acknowledge, add, add, assertAckMatchesDispatched, countBeforeFull, createMessageDispatch, dispatch, dispatchPending, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, getPendingMessageSize, getPendingQueueSize, isFull, isHighWaterMark, isLowWaterMark, isRecoveryRequired, onDispatch, processExpiredAck, processMessageDispatchNotification, pullMessage, remove, remove, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPendingBatchSize, setPrefetchSize, trackedInPendingTransaction, updateConsumerPrefetchMethods inherited from class org.apache.activemq.broker.region.AbstractSubscription
addDestination, addRecoveredMessage, contractPrefetchExtension, decrementPrefetchExtension, doAddRecoveredMessage, expandPrefetchExtension, gc, getActiveMQDestination, getConsumedCount, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getDestinations, getInFlightMessageSize, getInFlightUsage, getInfo, getObjectName, getPrefetchExtension, getPrefetchSize, getSelector, getSelectorExpression, getSubscriptionStatistics, getTimeOfLastMessageAck, incrementConsumedCount, isBrowser, isSlowConsumer, isUsePrefetchExtension, isWildcard, matches, matches, removeDestination, resetConsumedCount, setCursorMemoryHighWaterMark, setObjectName, setSelector, setSlowConsumer, setTimeOfLastMessageAck, setUsePrefetchExtension, unmatched, wakeupDestinationsForDispatch
-
Constructor Details
-
QueueSubscription
public QueueSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, org.apache.activemq.command.ConsumerInfo info) throws jakarta.jms.JMSException - Throws:
jakarta.jms.JMSException
-
-
Method Details
-
acknowledge
protected void acknowledge(ConnectionContext context, org.apache.activemq.command.MessageAck ack, org.apache.activemq.broker.region.MessageReference n) throws IOException In the queue case, mark the node as dropped and then a gc cycle will remove it from the queue.- Specified by:
acknowledgein classPrefetchSubscription- Throws:
IOException
-
canDispatch
protected boolean canDispatch(org.apache.activemq.broker.region.MessageReference n) throws IOException Description copied from class:PrefetchSubscriptionUse when a matched message is about to be dispatched to the client.- Specified by:
canDispatchin classPrefetchSubscription- Returns:
- false if the message should not be dispatched to the client (another sub may have already dispatched it for example).
- Throws:
IOException
-
toString
-
getLockPriority
public int getLockPriority()- Specified by:
getLockPriorityin interfaceLockOwner
-
isLockExclusive
public boolean isLockExclusive()- Specified by:
isLockExclusivein interfaceLockOwner
-
destroy
public void destroy()Description copied from interface:SubscriptionCalled when the subscription is destroyed.- Specified by:
destroyin interfaceSubscription
-
isDropped
protected boolean isDropped(org.apache.activemq.broker.region.MessageReference node) - Specified by:
isDroppedin classPrefetchSubscription
-