Class QueueImpl
java.lang.Object
org.apache.activemq.artemis.utils.critical.CriticalComponentImpl
org.apache.activemq.artemis.core.server.impl.QueueImpl
- All Implemented Interfaces:
Bindable,Queue,CriticalComponent
- Direct Known Subclasses:
LastValueQueue
Implementation of a Queue
Completely non blocking between adding to queue and delivering to consumers.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classQueueImpl.ConsumerHolder<T extends Consumer> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intstatic final intstatic final intIf The system gets slow for any reason, this is the maximum time a Delivery or or depage executor should be hanging onintlongstatic final intprotected final PriorityLinkedList<MessageReference>static final intprotected final PageSubscriptionprotected final QueueMessageMetricsprotected final QueueConfigurationprotected final ScheduledDeliveryHandlerFields inherited from interface org.apache.activemq.artemis.core.server.Queue
MAX_CONSUMERS_UNLIMITED -
Constructor Summary
ConstructorsConstructorDescriptionQueueImpl(QueueConfiguration queueConfiguration, Filter filter, PagingStore pagingStore, PageSubscription pageSubscription, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, ArtemisExecutor executor, ActiveMQServer server, QueueFactory factory) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidacknowledge(MessageReference ref, AckReason reason, ServerConsumer consumer) voidacknowledge(MessageReference ref, ServerConsumer consumer) voidacknowledge(Transaction tx, MessageReference ref) voidacknowledge(Transaction tx, MessageReference ref, AckReason reason, ServerConsumer consumer, boolean delivering) The parameter delivering can be sent as false in situation where the ack is coming outside of the context of delivering.voidaddConsumer(Consumer consumer) voidaddHead(List<MessageReference> refs, boolean scheduling) voidaddHead(MessageReference ref, boolean scheduling) voidaddLingerSession(String sessionId) voidaddRedistributor(long delay) protected voidvoidaddSorted(List<MessageReference> refs, boolean scheduling) Called when a message is cancelled back into the queuevoidaddSorted(MessageReference ref, boolean scheduling) Called when a message is cancelled back into the queuevoidaddTail(MessageReference ref) voidaddTail(MessageReference ref, boolean direct) booleanthe current queue and consumer settings will allow use of the Reference Execution and callback.org.apache.activemq.artemis.core.server.impl.QueueImpl.QueueBrowserIteratorvoidcancel(MessageReference reference, long timeBase) voidcancel(Transaction tx, MessageReference reference) voidcancel(Transaction tx, MessageReference reference, boolean ignoreRedeliveryCheck) voidbooleanchangeReferencePriority(long messageID, byte newPriority) intchangeReferencesPriority(Filter filter, byte newPriority) checkRedelivery(MessageReference reference, long timeBase, boolean ignoreRedeliveryDelay) Returns a Pair of Booleans: the first indicates whether redelivery happened; the second indicates whether or not the message was actually sent to a DLA with bindings.voidclose()booleancopyReference(long messageID, SimpleString toQueue, Binding binding) debug()voiddecDelivering(MessageReference reference) intintdeleteAllReferences(int flushLimit) intdeleteMatchingReferences(int flushLimit, Filter filter1, AckReason ackReason) intdeleteMatchingReferences(Filter filter) voidvoiddeleteQueue(boolean removeConsumers) booleandeleteReference(long messageID) voidvoidvoiddeliverScheduledMessage(long messageId) cancels scheduled message with the corresponding message ID and sends it to the head of the queue.voidcancels scheduled messages and send them to the head of the queue.voiddeliverScheduledMessages(String filterString) cancels scheduled messages which match the filter and send them to the head of the queue.voidintdurableDown(Message message) intbooleanvoiderrorProcessing(Consumer consumer, Throwable t, MessageReference reference) This will print errors and decide what to do with the errored consumer from the protocol layer.voidexpire(MessageReference ref) voidexpire(MessageReference ref, ServerConsumer consumer, boolean delivering) The parameter delivering can be sent as false in situation where the ack is coming outside of the context of delivering.booleanexpireReference(long messageID) voidexpireReferences(Runnable done) intexpireReferences(Filter filter) Expire all the references in the queue which matches the filterbooleanvoidflushOnIntermediate(Runnable runnable) voidThis method will make sure that any pending message (including paged message) will be deliveredlonglonglongintlongintThis will hold a reference counter for every consumer present on the queue.longlongintReturn a Map consisting of consumer.toString and its messages.longlongintlonglongThis is the number of the durable messages in the queuelongThis is the persistent size of all the durable messages in the queueintlongintintgetID()intintlonglonglonglonglonglonggetName()intUsed on testing only *longlongThis is the size of the messages in the queue when persisted on disk which is used for metrics tracking to give an idea of the amount of data on the queue to be consumedlongintlonggetUser()static MessageGroups<Consumer>groupMap(int groupBuckets) inthashCode()booleanhasMatchingConsumer(Message message) voidvoidbooleanbooleanbooleanbooleanbooleanbooleanbooleanThe queue definition could be durable, but the messages could eventually be considered non durable.booleanbooleanbooleanbooleanbooleanWe can't send stuff to DLQ on queues used on clustered-bridge-communicationbooleanbooleanbooleanbooleanisPaused()booleanbooleanbooleanisSwept()booleaniterator()It will iterate through memory only (not paging)booleanmoveReference(long messageID, SimpleString toAddress, Binding binding, boolean rejectDuplicate) intmoveReferences(int flushLimit, Filter filter, SimpleString toAddress, boolean rejectDuplicates, int messageCount, Binding binding) intmoveReferences(int flushLimit, Filter filter, SimpleString toAddress, boolean rejectDuplicates, Binding binding) intmoveReferences(Filter filter, SimpleString toAddress, Binding binding) intmoveReferencesBetweenSnFQueues(SimpleString queueSuffix) voidpause()Pauses the queue.voidpause(boolean persist) Pauses the queue.voidpostAcknowledge(MessageReference ref, AckReason reason) voidpostAcknowledge(MessageReference ref, AckReason reason, boolean delivering) The parameter delivering can be sent as false in situation where the ack is coming outside of the context of delivering.protected voidvoidreacknowledge(Transaction tx, MessageReference ref) voidrecheckRefCount(OperationContext context) This is to perform a check on the counter againprotected voidrefAdded(MessageReference ref) voidrefDown(MessageReference messageReference) voidprotected voidvoidrefUp(MessageReference messageReference) voidreload(MessageReference ref) voidreloadPause(long recordID) voidvoidThis method will push a removeAddress call into server's remove addressvoidremoveConsumer(Consumer consumer) voidremoveLingerSession(String sessionId) protected voidremoveMessageReference(QueueImpl.ConsumerHolder<? extends Consumer> holder, MessageReference ref) removeReferenceWithID(long id1) removeWithSuppliedID(String serverID, long id, NodeStoreFactory<MessageReference> nodeStore) Remove item with a supplied non-negative (>= 0) ID.intrerouteMessages(SimpleString queueName, Filter filter) voidvoidvoidresetGroup(SimpleString groupId) voidvoidvoidvoidvoidresume()Resumes the delivery of message for the queue.intretryMessages(Filter filter) intretryMessages(Filter filter, Integer expectedHits) voidroute(Message message, RoutingContext context) voidrouteWithAck(Message message, RoutingContext context) protected booleanintbooleansendMessageToDeadLetterAddress(long messageID) booleanReturns whether the message was actually sent to a DLA with bindings.voidsetConfigurationManaged(boolean configurationManaged) voidsetConsumersBeforeDispatch(int consumersBeforeDispatch) voidsetDelayBeforeDispatch(long delayBeforeDispatch) voidsetDispatching(boolean dispatching) voidsetEnabled(boolean value) voidsetExclusive(boolean exclusive) voidvoidsetGroupBuckets(int groupBuckets) voidsetGroupFirstKey(SimpleString groupFirstKey) voidsetGroupRebalance(boolean groupRebalance) voidsetGroupRebalancePauseDispatch(boolean groupRebalancePauseDispatch) voidsetInternalQueue(boolean internalQueue) voidsetMaxConsumer(int maxConsumers) voidsetMirrorController(boolean mirrorController) voidsetNonDestructive(boolean nonDestructive) voidsetPurgeOnNoConsumers(boolean value) voidsetRingSize(long ringSize) voidsetRoutingType(RoutingType routingType) voidsetSwept(boolean swept) voidsetUser(SimpleString user) toString()voidunproposed(SimpleString groupID) Methods inherited from class org.apache.activemq.artemis.utils.critical.CriticalComponentImpl
checkExpiration, getCriticalAnalyzer, measureCriticalMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.activemq.artemis.utils.critical.CriticalComponent
checkExpiration, getCriticalAnalyzer, measureCriticalMethods inherited from interface org.apache.activemq.artemis.core.server.Queue
deleteMatchingReferences, expireReferences, forEach
-
Field Details
-
CRITICAL_PATHS
protected static final int CRITICAL_PATHS- See Also:
-
CRITICAL_PATH_ADD_TAIL
protected static final int CRITICAL_PATH_ADD_TAIL- See Also:
-
CRITICAL_PATH_ADD_HEAD
protected static final int CRITICAL_PATH_ADD_HEAD- See Also:
-
CRITICAL_DELIVER
protected static final int CRITICAL_DELIVER- See Also:
-
CRITICAL_CONSUMER
protected static final int CRITICAL_CONSUMER- See Also:
-
CRITICAL_CHECK_DEPAGE
protected static final int CRITICAL_CHECK_DEPAGE- See Also:
-
NUM_PRIORITIES
public static final int NUM_PRIORITIES- See Also:
-
MAX_DELIVERIES_IN_LOOP
public static final int MAX_DELIVERIES_IN_LOOP- See Also:
-
CHECK_QUEUE_SIZE_PERIOD
public static final int CHECK_QUEUE_SIZE_PERIOD- See Also:
-
DELIVERY_TIMEOUT
public static final int DELIVERY_TIMEOUTIf The system gets slow for any reason, this is the maximum time a Delivery or or depage executor should be hanging on- See Also:
-
DEFAULT_FLUSH_LIMIT
public static final int DEFAULT_FLUSH_LIMIT- See Also:
-
pageSubscription
-
messageReferences
-
pendingMetrics
-
scheduledDeliveryHandler
-
dispatching
public volatile int dispatching -
dispatchStartTime
public volatile long dispatchStartTime -
queueConfiguration
-
-
Constructor Details
-
QueueImpl
public QueueImpl(QueueConfiguration queueConfiguration, Filter filter, PagingStore pagingStore, PageSubscription pageSubscription, ScheduledExecutorService scheduledExecutor, PostOffice postOffice, StorageManager storageManager, HierarchicalRepository<AddressSettings> addressSettingsRepository, ArtemisExecutor executor, ActiveMQServer server, QueueFactory factory)
-
-
Method Details
-
isSwept
public boolean isSwept() -
setSwept
public void setSwept(boolean swept) -
debug
-
allowsReferenceCallback
public boolean allowsReferenceCallback()Description copied from interface:Queuethe current queue and consumer settings will allow use of the Reference Execution and callback. This is because- Specified by:
allowsReferenceCallbackin interfaceQueue
-
isMirrorController
public boolean isMirrorController()- Specified by:
isMirrorControllerin interfaceQueue
-
setMirrorController
public void setMirrorController(boolean mirrorController) - Specified by:
setMirrorControllerin interfaceQueue
-
getRoutingName
-
getUniqueName
-
getUser
-
setUser
-
isExclusive
public boolean isExclusive()- Specified by:
isExclusivein interfaceQueue
-
setExclusive
public void setExclusive(boolean exclusive) - Specified by:
setExclusivein interfaceQueue
-
getConsumersBeforeDispatch
public int getConsumersBeforeDispatch()- Specified by:
getConsumersBeforeDispatchin interfaceQueue
-
setConsumersBeforeDispatch
public void setConsumersBeforeDispatch(int consumersBeforeDispatch) - Specified by:
setConsumersBeforeDispatchin interfaceQueue
-
getDelayBeforeDispatch
public long getDelayBeforeDispatch()- Specified by:
getDelayBeforeDispatchin interfaceQueue
-
setDelayBeforeDispatch
public void setDelayBeforeDispatch(long delayBeforeDispatch) - Specified by:
setDelayBeforeDispatchin interfaceQueue
-
getDispatchStartTime
public long getDispatchStartTime()- Specified by:
getDispatchStartTimein interfaceQueue
-
isDispatching
public boolean isDispatching()- Specified by:
isDispatchingin interfaceQueue
-
setDispatching
public void setDispatching(boolean dispatching) - Specified by:
setDispatchingin interfaceQueue
-
isLastValue
public boolean isLastValue()- Specified by:
isLastValuein interfaceQueue
-
getLastValueKey
- Specified by:
getLastValueKeyin interfaceQueue
-
isNonDestructive
public boolean isNonDestructive()- Specified by:
isNonDestructivein interfaceQueue
-
setNonDestructive
public void setNonDestructive(boolean nonDestructive) - Specified by:
setNonDestructivein interfaceQueue
-
route
-
routeWithAck
- Specified by:
routeWithAckin interfaceBindable
-
getConsumersRefCount
Description copied from interface:QueueThis will hold a reference counter for every consumer present on the queue. The ReferenceCounter will know what to do when the counter became zeroed. This is used to control what to do with temporary queues, especially on shared subscriptions where the queue needs to be deleted when all the consumers are closed.- Specified by:
getConsumersRefCountin interfaceQueue
-
isDurable
public boolean isDurable() -
isDurableMessage
public boolean isDurableMessage()Description copied from interface:QueueThe queue definition could be durable, but the messages could eventually be considered non durable. (e.g. purgeOnNoConsumers)- Specified by:
isDurableMessagein interfaceQueue
-
isAutoDelete
public boolean isAutoDelete()- Specified by:
isAutoDeletein interfaceQueue
-
getAutoDeleteDelay
public long getAutoDeleteDelay()- Specified by:
getAutoDeleteDelayin interfaceQueue
-
getAutoDeleteMessageCount
public long getAutoDeleteMessageCount()- Specified by:
getAutoDeleteMessageCountin interfaceQueue
-
isTemporary
public boolean isTemporary()- Specified by:
isTemporaryin interfaceQueue
-
isAutoCreated
public boolean isAutoCreated()- Specified by:
isAutoCreatedin interfaceQueue
-
isPurgeOnNoConsumers
public boolean isPurgeOnNoConsumers()- Specified by:
isPurgeOnNoConsumersin interfaceQueue
-
setPurgeOnNoConsumers
public void setPurgeOnNoConsumers(boolean value) - Specified by:
setPurgeOnNoConsumersin interfaceQueue
-
isEnabled
public boolean isEnabled() -
setEnabled
public void setEnabled(boolean value) - Specified by:
setEnabledin interfaceQueue
-
getMaxConsumers
public int getMaxConsumers()- Specified by:
getMaxConsumersin interfaceQueue
-
setMaxConsumer
public void setMaxConsumer(int maxConsumers) - Specified by:
setMaxConsumerin interfaceQueue
-
getGroupBuckets
public int getGroupBuckets()- Specified by:
getGroupBucketsin interfaceQueue
-
setGroupBuckets
public void setGroupBuckets(int groupBuckets) - Specified by:
setGroupBucketsin interfaceQueue
-
isGroupRebalance
public boolean isGroupRebalance()- Specified by:
isGroupRebalancein interfaceQueue
-
setGroupRebalance
public void setGroupRebalance(boolean groupRebalance) - Specified by:
setGroupRebalancein interfaceQueue
-
isGroupRebalancePauseDispatch
public boolean isGroupRebalancePauseDispatch()- Specified by:
isGroupRebalancePauseDispatchin interfaceQueue
-
setGroupRebalancePauseDispatch
public void setGroupRebalancePauseDispatch(boolean groupRebalancePauseDispatch) - Specified by:
setGroupRebalancePauseDispatchin interfaceQueue
-
getGroupFirstKey
- Specified by:
getGroupFirstKeyin interfaceQueue
-
setGroupFirstKey
- Specified by:
setGroupFirstKeyin interfaceQueue
-
isConfigurationManaged
public boolean isConfigurationManaged()- Specified by:
isConfigurationManagedin interfaceQueue
-
setConfigurationManaged
public void setConfigurationManaged(boolean configurationManaged) - Specified by:
setConfigurationManagedin interfaceQueue
-
getName
-
getAddress
- Specified by:
getAddressin interfaceQueue
-
getID
-
durableUp
-
durableDown
- Specified by:
durableDownin interfaceQueue
-
refUp
-
refDown
-
getPagingStore
- Specified by:
getPagingStorein interfaceQueue
-
getPageSubscription
- Specified by:
getPageSubscriptionin interfaceQueue
-
getRoutingType
- Specified by:
getRoutingTypein interfaceQueue
-
getInitialQueueBufferSize
public int getInitialQueueBufferSize()- Specified by:
getInitialQueueBufferSizein interfaceQueue
-
setRoutingType
- Specified by:
setRoutingTypein interfaceQueue
-
getFilter
-
setFilter
-
unproposed
- Specified by:
unproposedin interfaceQueue
-
addHead
-
addSorted
Description copied from interface:QueueCalled when a message is cancelled back into the queue -
addHead
-
addSorted
Description copied from interface:QueueCalled when a message is cancelled back into the queue -
reload
-
reloadSequence
- Specified by:
reloadSequencein interfaceQueue
-
addTail
-
flushOnIntermediate
- Specified by:
flushOnIntermediatein interfaceQueue
-
addTail
-
scheduleIfPossible
-
forceDelivery
public void forceDelivery()Description copied from interface:QueueThis method will make sure that any pending message (including paged message) will be delivered- Specified by:
forceDeliveryin interfaceQueue
-
deliverAsync
public void deliverAsync()- Specified by:
deliverAsyncin interfaceQueue
-
close
-
getExecutor
- Specified by:
getExecutorin interfaceQueue
-
deliverNow
public void deliverNow() -
flushExecutor
public boolean flushExecutor()- Specified by:
flushExecutorin interfaceQueue
-
addConsumer
- Specified by:
addConsumerin interfaceQueue- Throws:
Exception
-
addLingerSession
- Specified by:
addLingerSessionin interfaceQueue
-
removeLingerSession
- Specified by:
removeLingerSessionin interfaceQueue
-
removeConsumer
- Specified by:
removeConsumerin interfaceQueue
-
getRedistributor
-
addRedistributor
public void addRedistributor(long delay) - Specified by:
addRedistributorin interfaceQueue
-
cancelRedistributor
public void cancelRedistributor()- Specified by:
cancelRedistributorin interfaceQueue
-
getConsumerCount
public int getConsumerCount()- Specified by:
getConsumerCountin interfaceQueue
-
getConsumerRemovedTimestamp
public long getConsumerRemovedTimestamp()- Specified by:
getConsumerRemovedTimestampin interfaceQueue
-
getRingSize
public long getRingSize()- Specified by:
getRingSizein interfaceQueue
-
setRingSize
public void setRingSize(long ringSize) - Specified by:
setRingSizein interfaceQueue
-
getCreatedTimestamp
public long getCreatedTimestamp()- Specified by:
getCreatedTimestampin interfaceQueue
-
getPendingMessageCount
public long getPendingMessageCount()- Specified by:
getPendingMessageCountin interfaceQueue
-
getConsumers
- Specified by:
getConsumersin interfaceQueue
-
getGroups
-
resetGroup
- Specified by:
resetGroupin interfaceQueue
-
resetAllGroups
public void resetAllGroups()- Specified by:
resetAllGroupsin interfaceQueue
-
getGroupCount
public int getGroupCount()- Specified by:
getGroupCountin interfaceQueue
-
hasMatchingConsumer
- Specified by:
hasMatchingConsumerin interfaceQueue
-
iterator
Description copied from interface:QueueIt will iterate through memory only (not paging) -
browserIterator
public org.apache.activemq.artemis.core.server.impl.QueueImpl.QueueBrowserIterator browserIterator()- Specified by:
browserIteratorin interfaceQueue
-
peekFirstMessage
- Specified by:
peekFirstMessagein interfaceQueue
-
peekFirstScheduledMessage
- Specified by:
peekFirstScheduledMessagein interfaceQueue
-
removeReferenceWithID
- Specified by:
removeReferenceWithIDin interfaceQueue- Throws:
Exception
-
getMessageCount
public long getMessageCount()- Specified by:
getMessageCountin interfaceQueue
-
getPersistentSize
public long getPersistentSize()Description copied from interface:QueueThis is the size of the messages in the queue when persisted on disk which is used for metrics tracking to give an idea of the amount of data on the queue to be consumedNote that this includes all messages on the queue, even messages that are non-durable which may only be in memory
- Specified by:
getPersistentSizein interfaceQueue
-
getDurableMessageCount
public long getDurableMessageCount()Description copied from interface:QueueThis is the number of the durable messages in the queue- Specified by:
getDurableMessageCountin interfaceQueue
-
getDurablePersistentSize
public long getDurablePersistentSize()Description copied from interface:QueueThis is the persistent size of all the durable messages in the queue- Specified by:
getDurablePersistentSizein interfaceQueue
-
getScheduledCount
public int getScheduledCount()- Specified by:
getScheduledCountin interfaceQueue
-
getScheduledSize
public long getScheduledSize()- Specified by:
getScheduledSizein interfaceQueue
-
getDurableScheduledCount
public int getDurableScheduledCount()- Specified by:
getDurableScheduledCountin interfaceQueue
-
getDurableScheduledSize
public long getDurableScheduledSize()- Specified by:
getDurableScheduledSizein interfaceQueue
-
getScheduledMessages
- Specified by:
getScheduledMessagesin interfaceQueue
-
getDeliveringMessages
Description copied from interface:QueueReturn a Map consisting of consumer.toString and its messages. Delivering message is a property of the consumer. This method will aggregate the results per Server's consumer object.- Specified by:
getDeliveringMessagesin interfaceQueue
-
getDeliveringCount
public int getDeliveringCount()- Specified by:
getDeliveringCountin interfaceQueue
-
getDeliveringSize
public long getDeliveringSize()- Specified by:
getDeliveringSizein interfaceQueue
-
getDurableDeliveringCount
public int getDurableDeliveringCount()- Specified by:
getDurableDeliveringCountin interfaceQueue
-
getDurableDeliveringSize
public long getDurableDeliveringSize()- Specified by:
getDurableDeliveringSizein interfaceQueue
-
acknowledge
- Specified by:
acknowledgein interfaceQueue- Throws:
Exception
-
acknowledge
- Specified by:
acknowledgein interfaceQueue- Throws:
Exception
-
acknowledge
public void acknowledge(MessageReference ref, AckReason reason, ServerConsumer consumer) throws Exception - Specified by:
acknowledgein interfaceQueue- Throws:
Exception
-
acknowledge
- Specified by:
acknowledgein interfaceQueue- Throws:
Exception
-
acknowledge
public void acknowledge(Transaction tx, MessageReference ref, AckReason reason, ServerConsumer consumer, boolean delivering) throws Exception The parameter delivering can be sent as false in situation where the ack is coming outside of the context of delivering. Example: Mirror replication will call the ack here without any consumer involved. On that case no previous delivery happened, hence no information about delivering statistics should be updated.- Specified by:
acknowledgein interfaceQueue- Throws:
Exception
-
reacknowledge
- Specified by:
reacknowledgein interfaceQueue- Throws:
Exception
-
cancel
-
cancel
-
cancel
-
expire
-
expire
public void expire(MessageReference ref, ServerConsumer consumer, boolean delivering) throws Exception The parameter delivering can be sent as false in situation where the ack is coming outside of the context of delivering. Example: Mirror replication will call the ack here without any consumer involved. On that case no previous delivery happened, hence no information about delivering statistics should be updated. -
getExpiryAddress
- Specified by:
getExpiryAddressin interfaceQueue
-
getDeadLetterAddress
- Specified by:
getDeadLetterAddressin interfaceQueue
-
referenceHandled
- Specified by:
referenceHandledin interfaceQueue
-
incrementMesssagesAdded
public void incrementMesssagesAdded()- Specified by:
incrementMesssagesAddedin interfaceQueue
-
deliverScheduledMessages
Description copied from interface:Queuecancels scheduled messages and send them to the head of the queue.- Specified by:
deliverScheduledMessagesin interfaceQueue- Throws:
ActiveMQException
-
deliverScheduledMessages
Description copied from interface:Queuecancels scheduled messages which match the filter and send them to the head of the queue.- Specified by:
deliverScheduledMessagesin interfaceQueue- Throws:
ActiveMQException
-
deliverScheduledMessage
Description copied from interface:Queuecancels scheduled message with the corresponding message ID and sends it to the head of the queue.- Specified by:
deliverScheduledMessagein interfaceQueue- Throws:
ActiveMQException
-
getMessagesAdded
public long getMessagesAdded()- Specified by:
getMessagesAddedin interfaceQueue
-
getMessagesAcknowledged
public long getMessagesAcknowledged()- Specified by:
getMessagesAcknowledgedin interfaceQueue
-
getAcknowledgeAttempts
public long getAcknowledgeAttempts()- Specified by:
getAcknowledgeAttemptsin interfaceQueue
-
getMessagesExpired
public long getMessagesExpired()- Specified by:
getMessagesExpiredin interfaceQueue
-
getMessagesKilled
public long getMessagesKilled()- Specified by:
getMessagesKilledin interfaceQueue
-
getMessagesReplaced
public long getMessagesReplaced()- Specified by:
getMessagesReplacedin interfaceQueue
-
deleteAllReferences
- Specified by:
deleteAllReferencesin interfaceQueue- Throws:
Exception
-
deleteAllReferences
- Specified by:
deleteAllReferencesin interfaceQueue- Throws:
Exception
-
deleteMatchingReferences
- Specified by:
deleteMatchingReferencesin interfaceQueue- Throws:
Exception
-
deleteMatchingReferences
public int deleteMatchingReferences(int flushLimit, Filter filter1, AckReason ackReason) throws Exception - Specified by:
deleteMatchingReferencesin interfaceQueue- Throws:
Exception
-
destroyPaging
- Specified by:
destroyPagingin interfaceQueue- Throws:
Exception
-
deleteReference
- Specified by:
deleteReferencein interfaceQueue- Throws:
Exception
-
deleteQueue
- Specified by:
deleteQueuein interfaceQueue- Throws:
Exception
-
removeAddress
Description copied from interface:QueueThis method will push a removeAddress call into server's remove address- Specified by:
removeAddressin interfaceQueue- Throws:
Exception
-
deleteQueue
- Specified by:
deleteQueuein interfaceQueue- Throws:
Exception
-
expireReference
- Specified by:
expireReferencein interfaceQueue- Throws:
Exception
-
expireReferences
Description copied from interface:QueueExpire all the references in the queue which matches the filter- Specified by:
expireReferencesin interfaceQueue- Throws:
Exception
-
expireReferences
- Specified by:
expireReferencesin interfaceQueue
-
sendMessageToDeadLetterAddress
- Specified by:
sendMessageToDeadLetterAddressin interfaceQueue- Throws:
Exception
-
sendMessagesToDeadLetterAddress
- Specified by:
sendMessagesToDeadLetterAddressin interfaceQueue- Throws:
Exception
-
moveReference
public boolean moveReference(long messageID, SimpleString toAddress, Binding binding, boolean rejectDuplicate) throws Exception - Specified by:
moveReferencein interfaceQueue- Throws:
Exception
-
moveReferences
- Specified by:
moveReferencesin interfaceQueue- Throws:
Exception
-
moveReferences
public int moveReferences(int flushLimit, Filter filter, SimpleString toAddress, boolean rejectDuplicates, Binding binding) throws Exception - Specified by:
moveReferencesin interfaceQueue- Throws:
Exception
-
moveReferences
public int moveReferences(int flushLimit, Filter filter, SimpleString toAddress, boolean rejectDuplicates, int messageCount, Binding binding) throws Exception - Specified by:
moveReferencesin interfaceQueue- Throws:
Exception
-
moveReferencesBetweenSnFQueues
- Throws:
Exception
-
copyReference
public boolean copyReference(long messageID, SimpleString toQueue, Binding binding) throws Exception - Specified by:
copyReferencein interfaceQueue- Throws:
Exception
-
rerouteMessages
- Throws:
Exception
-
retryMessages
- Specified by:
retryMessagesin interfaceQueue- Throws:
Exception
-
retryMessages
- Specified by:
retryMessagesin interfaceQueue- Throws:
Exception
-
changeReferencePriority
- Specified by:
changeReferencePriorityin interfaceQueue- Throws:
Exception
-
changeReferencesPriority
- Specified by:
changeReferencesPriorityin interfaceQueue- Throws:
Exception
-
resetAllIterators
public void resetAllIterators()- Specified by:
resetAllIteratorsin interfaceQueue
-
pause
public void pause()Description copied from interface:QueuePauses the queue. It will receive messages but won't give them to the consumers until resumed. If a queue is paused, pausing it again will only throw a warning. To check if a queue is paused, invoke isPaused() -
reloadPause
public void reloadPause(long recordID) - Specified by:
reloadPausein interfaceQueue
-
pause
public void pause(boolean persist) Description copied from interface:QueuePauses the queue. It will receive messages but won't give them to the consumers until resumed. If a queue is paused, pausing it again will only throw a warning. To check if a queue is paused, invokeQueue.isPaused(). -
resume
public void resume()Description copied from interface:QueueResumes the delivery of message for the queue. If a queue is resumed, resuming it again will only throw a warning. To check if a queue is resumed, invokeQueue.isPaused(). -
isPaused
public boolean isPaused() -
isPersistedPause
public boolean isPersistedPause()- Specified by:
isPersistedPausein interfaceQueue
-
isDirectDeliver
public boolean isDirectDeliver()- Specified by:
isDirectDeliverin interfaceQueue
-
isInternalQueue
public boolean isInternalQueue()Description copied from interface:QueueWe can't send stuff to DLQ on queues used on clustered-bridge-communication- Specified by:
isInternalQueuein interfaceQueue
-
setInternalQueue
public void setInternalQueue(boolean internalQueue) - Specified by:
setInternalQueuein interfaceQueue
-
equals
-
hashCode
public int hashCode() -
toString
-
pruneLastValues
protected void pruneLastValues() -
removeMessageReference
protected void removeMessageReference(QueueImpl.ConsumerHolder<? extends Consumer> holder, MessageReference ref) -
refRemoved
-
addRefSize
-
refAdded
-
removeWithSuppliedID
public MessageReference removeWithSuppliedID(String serverID, long id, NodeStoreFactory<MessageReference> nodeStore) Description copied from interface:QueueRemove item with a supplied non-negative (>= 0) ID. If the idSupplier returns < 0 the ID is considered a non value (null) and it will be ignored.- Specified by:
removeWithSuppliedIDin interfaceQueue- See Also:
-
checkRedelivery
public Pair<Boolean,Boolean> checkRedelivery(MessageReference reference, long timeBase, boolean ignoreRedeliveryDelay) throws Exception Description copied from interface:QueueReturns a Pair of Booleans: the first indicates whether redelivery happened; the second indicates whether or not the message was actually sent to a DLA with bindings.- Specified by:
checkRedeliveryin interfaceQueue- Returns:
- a Pair of Booleans: the first indicates whether redelivery happened; the second indicates whether or not the message was actually sent to a DLA with bindings
- Throws:
Exception
-
getNumberOfReferences
public int getNumberOfReferences()Used on testing only * -
sendToDeadLetterAddress
Description copied from interface:QueueReturns whether the message was actually sent to a DLA with bindings.- Specified by:
sendToDeadLetterAddressin interfaceQueue- Returns:
- whether the message was actually sent to a DLA with bindings
- Throws:
Exception
-
errorProcessing
This will print errors and decide what to do with the errored consumer from the protocol layer.- Specified by:
errorProcessingin interfaceQueue
-
postAcknowledge
- Specified by:
postAcknowledgein interfaceQueue
-
postAcknowledge
The parameter delivering can be sent as false in situation where the ack is coming outside of the context of delivering. Example: Mirror replication will call the ack here without any consumer involved. On that case no previous delivery happened, hence no information about delivering statistics should be updated.- Specified by:
postAcknowledgein interfaceQueue
-
resetMessagesAdded
public void resetMessagesAdded()- Specified by:
resetMessagesAddedin interfaceQueue
-
resetMessagesAcknowledged
public void resetMessagesAcknowledged()- Specified by:
resetMessagesAcknowledgedin interfaceQueue
-
resetMessagesExpired
public void resetMessagesExpired()- Specified by:
resetMessagesExpiredin interfaceQueue
-
resetMessagesKilled
public void resetMessagesKilled()- Specified by:
resetMessagesKilledin interfaceQueue
-
recheckRefCount
Description copied from interface:QueueThis is to perform a check on the counter again- Specified by:
recheckRefCountin interfaceQueue
-
groupMap
-
getQueueConfiguration
- Specified by:
getQueueConfigurationin interfaceQueue
-
incDelivering
-
decDelivering
-