Interface Queue

All Superinterfaces:
Bindable, CriticalComponent
All Known Implementing Classes:
LastValueQueue, QueueImpl

public interface Queue extends Bindable, CriticalComponent
  • Field Details

  • Method Details

    • getName

      SimpleString getName()
    • getID

      Long getID()
    • getFilter

      Filter getFilter()
    • setFilter

      void setFilter(Filter filter)
    • getPagingStore

      PagingStore getPagingStore()
    • getPageSubscription

      PageSubscription getPageSubscription()
    • getRoutingType

      RoutingType getRoutingType()
    • setRoutingType

      void setRoutingType(RoutingType routingType)
    • allowsReferenceCallback

      boolean allowsReferenceCallback()
      the current queue and consumer settings will allow use of the Reference Execution and callback. This is because
    • isDurable

      boolean isDurable()
    • durableUp

      int durableUp(Message message)
    • durableDown

      int durableDown(Message message)
    • refUp

      void refUp(MessageReference messageReference)
    • refDown

      void refDown(MessageReference messageReference)
    • removeWithSuppliedID

      MessageReference removeWithSuppliedID(String serverID, long id, NodeStoreFactory<MessageReference> nodeStore)
      Remove 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.
      See Also:
    • isDurableMessage

      boolean isDurableMessage()
      The queue definition could be durable, but the messages could eventually be considered non durable. (e.g. purgeOnNoConsumers)
    • isAutoDelete

      boolean isAutoDelete()
    • isSwept

      default boolean isSwept()
    • setSwept

      default void setSwept(boolean sweep)
    • getAutoDeleteDelay

      long getAutoDeleteDelay()
    • getAutoDeleteMessageCount

      long getAutoDeleteMessageCount()
    • isTemporary

      boolean isTemporary()
    • isAutoCreated

      boolean isAutoCreated()
    • isPurgeOnNoConsumers

      boolean isPurgeOnNoConsumers()
    • setPurgeOnNoConsumers

      void setPurgeOnNoConsumers(boolean value)
    • isEnabled

      boolean isEnabled()
    • setEnabled

      void setEnabled(boolean value)
    • getConsumersBeforeDispatch

      int getConsumersBeforeDispatch()
    • setConsumersBeforeDispatch

      void setConsumersBeforeDispatch(int consumersBeforeDispatch)
    • getDelayBeforeDispatch

      long getDelayBeforeDispatch()
    • setDelayBeforeDispatch

      void setDelayBeforeDispatch(long delayBeforeDispatch)
    • getDispatchStartTime

      long getDispatchStartTime()
    • isDispatching

      boolean isDispatching()
    • setDispatching

      void setDispatching(boolean dispatching)
    • isExclusive

      boolean isExclusive()
    • setExclusive

      void setExclusive(boolean value)
    • isLastValue

      boolean isLastValue()
    • getLastValueKey

      SimpleString getLastValueKey()
    • isNonDestructive

      boolean isNonDestructive()
    • setNonDestructive

      void setNonDestructive(boolean nonDestructive)
    • getMaxConsumers

      int getMaxConsumers()
    • setMaxConsumer

      void setMaxConsumer(int maxConsumers)
    • getGroupBuckets

      int getGroupBuckets()
    • setGroupBuckets

      void setGroupBuckets(int groupBuckets)
    • isGroupRebalance

      boolean isGroupRebalance()
    • setGroupRebalance

      void setGroupRebalance(boolean groupRebalance)
    • isGroupRebalancePauseDispatch

      boolean isGroupRebalancePauseDispatch()
    • setGroupRebalancePauseDispatch

      void setGroupRebalancePauseDispatch(boolean groupRebalancePauseDisptach)
    • getGroupFirstKey

      SimpleString getGroupFirstKey()
    • setGroupFirstKey

      void setGroupFirstKey(SimpleString groupFirstKey)
    • isConfigurationManaged

      boolean isConfigurationManaged()
    • setConfigurationManaged

      void setConfigurationManaged(boolean configurationManaged)
    • addConsumer

      void addConsumer(Consumer consumer) throws Exception
      Throws:
      Exception
    • addLingerSession

      void addLingerSession(String sessionId)
    • removeLingerSession

      void removeLingerSession(String sessionId)
    • removeConsumer

      void removeConsumer(Consumer consumer)
    • getConsumerCount

      int getConsumerCount()
    • getConsumerRemovedTimestamp

      long getConsumerRemovedTimestamp()
    • setRingSize

      void setRingSize(long ringSize)
    • getRingSize

      long getRingSize()
    • getInitialQueueBufferSize

      int getInitialQueueBufferSize()
    • isMirrorController

      default boolean isMirrorController()
    • setMirrorController

      default void setMirrorController(boolean mirrorController)
    • getConsumersRefCount

      ReferenceCounter getConsumersRefCount()
      This 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.
    • addSorted

      void addSorted(List<MessageReference> refs, boolean scheduling)
      Called when a message is cancelled back into the queue
    • reload

      void reload(MessageReference ref)
    • reloadSequence

      void reloadSequence(MessageReference ref)
    • flushOnIntermediate

      default void flushOnIntermediate(Runnable runnable)
    • addTail

      void addTail(MessageReference ref)
    • addTail

      void addTail(MessageReference ref, boolean direct)
    • addHead

      void addHead(MessageReference ref, boolean scheduling)
    • addSorted

      void addSorted(MessageReference ref, boolean scheduling)
      Called when a message is cancelled back into the queue
    • addHead

      void addHead(List<MessageReference> refs, boolean scheduling)
    • acknowledge

      void acknowledge(MessageReference ref) throws Exception
      Throws:
      Exception
    • acknowledge

      void acknowledge(MessageReference ref, ServerConsumer consumer) throws Exception
      Throws:
      Exception
    • acknowledge

      void acknowledge(MessageReference ref, AckReason reason, ServerConsumer consumer) throws Exception
      Throws:
      Exception
    • acknowledge

      void acknowledge(Transaction tx, MessageReference ref) throws Exception
      Throws:
      Exception
    • acknowledge

      void acknowledge(Transaction tx, MessageReference ref, AckReason reason, ServerConsumer consumer, boolean delivering) throws Exception
      Throws:
      Exception
    • reacknowledge

      void reacknowledge(Transaction tx, MessageReference ref) throws Exception
      Throws:
      Exception
    • cancel

      void cancel(Transaction tx, MessageReference ref)
    • cancel

      void cancel(Transaction tx, MessageReference ref, boolean ignoreRedeliveryCheck)
    • cancel

      void cancel(MessageReference reference, long timeBase) throws Exception
      Throws:
      Exception
    • deliverAsync

      void deliverAsync()
    • unproposed

      void unproposed(SimpleString groupID)
    • forceDelivery

      void forceDelivery()
      This method will make sure that any pending message (including paged message) will be delivered
    • deleteQueue

      void deleteQueue() throws Exception
      Throws:
      Exception
    • deleteQueue

      void deleteQueue(boolean removeConsumers) throws Exception
      Throws:
      Exception
    • removeAddress

      void removeAddress() throws Exception
      This method will push a removeAddress call into server's remove address
      Throws:
      Exception
    • destroyPaging

      void destroyPaging() throws Exception
      Throws:
      Exception
    • getMessageCount

      long getMessageCount()
    • getPersistentSize

      long getPersistentSize()
      This 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 consumed

      Note that this includes all messages on the queue, even messages that are non-durable which may only be in memory

    • getDurableMessageCount

      long getDurableMessageCount()
      This is the number of the durable messages in the queue
    • getDurablePersistentSize

      long getDurablePersistentSize()
      This is the persistent size of all the durable messages in the queue
    • getDeliveringCount

      int getDeliveringCount()
    • getDeliveringSize

      long getDeliveringSize()
    • getDurableDeliveringCount

      int getDurableDeliveringCount()
    • getDurableDeliveringSize

      long getDurableDeliveringSize()
    • referenceHandled

      void referenceHandled(MessageReference ref)
    • getScheduledCount

      int getScheduledCount()
    • getScheduledSize

      long getScheduledSize()
    • getDurableScheduledCount

      int getDurableScheduledCount()
    • getDurableScheduledSize

      long getDurableScheduledSize()
    • getScheduledMessages

      List<MessageReference> getScheduledMessages()
    • getDeliveringMessages

      Map<String,List<MessageReference>> getDeliveringMessages()
      Return 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.
    • getMessagesAdded

      long getMessagesAdded()
    • getAcknowledgeAttempts

      long getAcknowledgeAttempts()
    • getMessagesAcknowledged

      long getMessagesAcknowledged()
    • getMessagesExpired

      long getMessagesExpired()
    • getMessagesKilled

      long getMessagesKilled()
    • getMessagesReplaced

      long getMessagesReplaced()
    • removeReferenceWithID

      MessageReference removeReferenceWithID(long id) throws Exception
      Throws:
      Exception
    • deleteAllReferences

      int deleteAllReferences() throws Exception
      Throws:
      Exception
    • deleteAllReferences

      int deleteAllReferences(int flushLimit) throws Exception
      Throws:
      Exception
    • deleteReference

      boolean deleteReference(long messageID) throws Exception
      Throws:
      Exception
    • deleteMatchingReferences

      int deleteMatchingReferences(Filter filter) throws Exception
      Throws:
      Exception
    • deleteMatchingReferences

      default int deleteMatchingReferences(int flushLImit, Filter filter) throws Exception
      Throws:
      Exception
    • deleteMatchingReferences

      int deleteMatchingReferences(int flushLImit, Filter filter, AckReason ackReason) throws Exception
      Throws:
      Exception
    • expireReference

      boolean expireReference(long messageID) throws Exception
      Throws:
      Exception
    • expireReferences

      int expireReferences(Filter filter) throws Exception
      Expire all the references in the queue which matches the filter
      Throws:
      Exception
    • expireReferences

      default void expireReferences()
    • expireReferences

      void expireReferences(Runnable done)
    • expire

      void expire(MessageReference ref) throws Exception
      Throws:
      Exception
    • expire

      void expire(MessageReference ref, ServerConsumer consumer, boolean delivering) throws Exception
      Throws:
      Exception
    • sendMessageToDeadLetterAddress

      boolean sendMessageToDeadLetterAddress(long messageID) throws Exception
      Throws:
      Exception
    • sendMessagesToDeadLetterAddress

      int sendMessagesToDeadLetterAddress(Filter filter) throws Exception
      Throws:
      Exception
    • sendToDeadLetterAddress

      boolean sendToDeadLetterAddress(Transaction tx, MessageReference ref) throws Exception
      Returns whether the message was actually sent to a DLA with bindings.
      Returns:
      whether the message was actually sent to a DLA with bindings
      Throws:
      Exception
    • changeReferencePriority

      boolean changeReferencePriority(long messageID, byte newPriority) throws Exception
      Throws:
      Exception
    • changeReferencesPriority

      int changeReferencesPriority(Filter filter, byte newPriority) throws Exception
      Throws:
      Exception
    • moveReference

      boolean moveReference(long messageID, SimpleString toAddress, Binding binding, boolean rejectDuplicates) throws Exception
      Throws:
      Exception
    • moveReferences

      int moveReferences(Filter filter, SimpleString toAddress, Binding binding) throws Exception
      Throws:
      Exception
    • moveReferences

      int moveReferences(int flushLimit, Filter filter, SimpleString toAddress, boolean rejectDuplicates, Binding binding) throws Exception
      Throws:
      Exception
    • moveReferences

      int moveReferences(int flushLimit, Filter filter, SimpleString toAddress, boolean rejectDuplicates, int messageCount, Binding binding) throws Exception
      Throws:
      Exception
    • copyReference

      boolean copyReference(long messageID, SimpleString queue, Binding binding) throws Exception
      Throws:
      Exception
    • retryMessages

      int retryMessages(Filter filter) throws Exception
      Throws:
      Exception
    • retryMessages

      default int retryMessages(Filter filter, Integer expectedHits) throws Exception
      Throws:
      Exception
    • addRedistributor

      void addRedistributor(long delay)
    • cancelRedistributor

      void cancelRedistributor()
    • hasMatchingConsumer

      boolean hasMatchingConsumer(Message message)
    • getPendingMessageCount

      long getPendingMessageCount()
    • getConsumers

      Collection<Consumer> getConsumers()
    • getGroups

      Map<SimpleString,Consumer> getGroups()
    • resetGroup

      void resetGroup(SimpleString groupID)
    • resetAllGroups

      void resetAllGroups()
    • getGroupCount

      int getGroupCount()
    • checkRedelivery

      Pair<Boolean,Boolean> checkRedelivery(MessageReference ref, long timeBase, boolean ignoreRedeliveryDelay) throws Exception
      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.
      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
    • iterator

      It will iterate through memory only (not paging)
    • forEach

      default void forEach(Consumer<MessageReference> consumer)
    • peekFirstMessage

      default MessageReference peekFirstMessage()
    • peekFirstScheduledMessage

      default MessageReference peekFirstScheduledMessage()
    • browserIterator

    • getExpiryAddress

      SimpleString getExpiryAddress()
    • getDeadLetterAddress

      SimpleString getDeadLetterAddress()
    • pause

      void pause()
      Pauses 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()
    • pause

      void pause(boolean persist)
      Pauses 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

      void reloadPause(long recordID)
    • resume

      void resume()
      Resumes 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, invoke isPaused().
    • isPaused

      boolean isPaused()
    • isPersistedPause

      boolean isPersistedPause()
    • getExecutor

      Executor getExecutor()
    • resetAllIterators

      void resetAllIterators()
    • flushExecutor

      boolean flushExecutor()
    • close

      void close() throws Exception
      Throws:
      Exception
    • isDirectDeliver

      boolean isDirectDeliver()
    • getAddress

      SimpleString getAddress()
    • isInternalQueue

      boolean isInternalQueue()
      We can't send stuff to DLQ on queues used on clustered-bridge-communication
    • setInternalQueue

      void setInternalQueue(boolean internalQueue)
    • resetMessagesAdded

      void resetMessagesAdded()
    • resetMessagesAcknowledged

      void resetMessagesAcknowledged()
    • resetMessagesExpired

      void resetMessagesExpired()
    • resetMessagesKilled

      void resetMessagesKilled()
    • incrementMesssagesAdded

      void incrementMesssagesAdded()
    • deliverScheduledMessages

      void deliverScheduledMessages() throws ActiveMQException
      cancels scheduled messages and send them to the head of the queue.
      Throws:
      ActiveMQException
    • deliverScheduledMessages

      void deliverScheduledMessages(String filter) throws ActiveMQException
      cancels scheduled messages which match the filter and send them to the head of the queue.
      Throws:
      ActiveMQException
    • deliverScheduledMessage

      void deliverScheduledMessage(long messageId) throws ActiveMQException
      cancels scheduled message with the corresponding message ID and sends it to the head of the queue.
      Throws:
      ActiveMQException
    • postAcknowledge

      void postAcknowledge(MessageReference ref, AckReason reason)
    • postAcknowledge

      void postAcknowledge(MessageReference ref, AckReason reason, boolean delivering)
    • getUser

      SimpleString getUser()
    • setUser

      void setUser(SimpleString user)
    • recheckRefCount

      void recheckRefCount(OperationContext context)
      This is to perform a check on the counter again
    • errorProcessing

      default void errorProcessing(Consumer consumer, Throwable t, MessageReference messageReference)
    • getQueueConfiguration

      default QueueConfiguration getQueueConfiguration()
    • getCreatedTimestamp

      default long getCreatedTimestamp()