Class BaseDestination

    • Field Detail

      • MAX_PAGE_SIZE

        public static final int MAX_PAGE_SIZE
        The maximum number of messages to page in to the destination from persistent storage
        See Also:
        Constant Field Values
      • DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC

        public static final long DEFAULT_INACTIVE_TIMEOUT_BEFORE_GC
        See Also:
        Constant Field Values
      • broker

        protected final Broker broker
      • lastBlockedProducerWarnTime

        protected long lastBlockedProducerWarnTime
      • blockedProducerWarningInterval

        protected long blockedProducerWarningInterval
      • regionBroker

        protected final Broker regionBroker
      • expireMessagesPeriod

        protected long expireMessagesPeriod
      • cursorMemoryHighWaterMark

        protected int cursorMemoryHighWaterMark
      • storeUsageHighWaterMark

        protected int storeUsageHighWaterMark
      • scheduler

        protected final Scheduler scheduler
    • Method Detail

      • initialize

        public void initialize()
                        throws Exception
        initialize the destination
        Throws:
        Exception
      • isProducerFlowControl

        public boolean isProducerFlowControl()
        Specified by:
        isProducerFlowControl in interface Destination
        Returns:
        the producerFlowControl
      • setProducerFlowControl

        public void setProducerFlowControl​(boolean producerFlowControl)
        Specified by:
        setProducerFlowControl in interface Destination
        Parameters:
        producerFlowControl - the producerFlowControl to set
      • setBlockedProducerWarningInterval

        public void setBlockedProducerWarningInterval​(long blockedProducerWarningInterval)
        Set's the interval at which warnings about producers being blocked by resource usage will be triggered. Values of 0 or less will disable warnings
        Specified by:
        setBlockedProducerWarningInterval in interface Destination
        Parameters:
        blockedProducerWarningInterval - the interval at which warning about blocked producers will be triggered.
      • getBlockedProducerWarningInterval

        public long getBlockedProducerWarningInterval()
        Specified by:
        getBlockedProducerWarningInterval in interface Destination
        Returns:
        the interval at which warning about blocked producers will be triggered.
      • setMaxProducersToAudit

        public void setMaxProducersToAudit​(int maxProducersToAudit)
        Specified by:
        setMaxProducersToAudit in interface Destination
        Parameters:
        maxProducersToAudit - the maxProducersToAudit to set
      • getMaxAuditDepth

        public int getMaxAuditDepth()
        Specified by:
        getMaxAuditDepth in interface Destination
        Returns:
        the maxAuditDepth
      • setMaxAuditDepth

        public void setMaxAuditDepth​(int maxAuditDepth)
        Specified by:
        setMaxAuditDepth in interface Destination
        Parameters:
        maxAuditDepth - the maxAuditDepth to set
      • isEnableAudit

        public boolean isEnableAudit()
        Specified by:
        isEnableAudit in interface Destination
        Returns:
        the enableAudit
      • setEnableAudit

        public void setEnableAudit​(boolean enableAudit)
        Specified by:
        setEnableAudit in interface Destination
        Parameters:
        enableAudit - the enableAudit to set
      • getMaxExpirePageSize

        public int getMaxExpirePageSize()
      • setMaxExpirePageSize

        public void setMaxExpirePageSize​(int maxPageSize)
      • setExpireMessagesPeriod

        public void setExpireMessagesPeriod​(long expireMessagesPeriod)
      • getExpireMessagesPeriod

        public long getExpireMessagesPeriod()
      • setUseCache

        public void setUseCache​(boolean useCache)
        Specified by:
        setUseCache in interface Destination
      • isLazyDispatch

        public boolean isLazyDispatch()
        Specified by:
        isLazyDispatch in interface Destination
        Returns:
        true if lazyDispatch is enabled
      • setLazyDispatch

        public void setLazyDispatch​(boolean lazyDispatch)
        Description copied from interface: Destination
        set the lazy dispatch - default is false
        Specified by:
        setLazyDispatch in interface Destination
      • getDestinationSequenceId

        protected long getDestinationSequenceId()
      • isAdvisoryForSlowConsumers

        public boolean isAdvisoryForSlowConsumers()
        Returns:
        the advisoryForSlowConsumers
      • setAdvisoryForSlowConsumers

        public void setAdvisoryForSlowConsumers​(boolean advisoryForSlowConsumers)
        Parameters:
        advisoryForSlowConsumers - the advisoryForSlowConsumers to set
      • isAdvisoryForDiscardingMessages

        public boolean isAdvisoryForDiscardingMessages()
        Returns:
        the advisoryForDiscardingMessages
      • setAdvisoryForDiscardingMessages

        public void setAdvisoryForDiscardingMessages​(boolean advisoryForDiscardingMessages)
        Parameters:
        advisoryForDiscardingMessages - the advisoryForDiscardingMessages to set
      • isAdvisoryWhenFull

        public boolean isAdvisoryWhenFull()
        Returns:
        the advisoryWhenFull
      • setAdvisoryWhenFull

        public void setAdvisoryWhenFull​(boolean advisoryWhenFull)
        Parameters:
        advisoryWhenFull - the advisoryWhenFull to set
      • isAdvisoryForDelivery

        public boolean isAdvisoryForDelivery()
        Returns:
        the advisoryForDelivery
      • setAdvisoryForDelivery

        public void setAdvisoryForDelivery​(boolean advisoryForDelivery)
        Parameters:
        advisoryForDelivery - the advisoryForDelivery to set
      • isAdvisoryForConsumed

        public boolean isAdvisoryForConsumed()
        Returns:
        the advisoryForConsumed
      • setAdvisoryForConsumed

        public void setAdvisoryForConsumed​(boolean advisoryForConsumed)
        Parameters:
        advisoryForConsumed - the advisoryForConsumed to set
      • isAdvisoryForFastProducers

        public boolean isAdvisoryForFastProducers()
        Returns:
        the advisdoryForFastProducers
      • setAdvisoryForFastProducers

        public void setAdvisoryForFastProducers​(boolean advisoryForFastProducers)
        Parameters:
        advisoryForFastProducers - the advisdoryForFastProducers to set
      • isSendAdvisoryIfNoConsumers

        public boolean isSendAdvisoryIfNoConsumers()
      • setSendAdvisoryIfNoConsumers

        public void setSendAdvisoryIfNoConsumers​(boolean sendAdvisoryIfNoConsumers)
      • isIncludeBodyForAdvisory

        public boolean isIncludeBodyForAdvisory()
      • setIncludeBodyForAdvisory

        public void setIncludeBodyForAdvisory​(boolean includeBodyForAdvisory)
      • setDeadLetterStrategy

        public void setDeadLetterStrategy​(DeadLetterStrategy deadLetterStrategy)
        set the dead letter strategy
        Parameters:
        deadLetterStrategy -
      • messageDiscarded

        public void messageDiscarded​(ConnectionContext context,
                                     Subscription sub,
                                     MessageReference messageReference)
        Called when a message is discarded - e.g. running low on memory This will happen only if the policy is enabled - e.g. non durable topics
        Specified by:
        messageDiscarded in interface Destination
        Parameters:
        context -
        messageReference -
      • onMessageWithNoConsumers

        protected void onMessageWithNoConsumers​(ConnectionContext context,
                                                Message msg)
                                         throws Exception
        Provides a hook to allow messages with no consumer to be processed in some way - such as to send to a dead letter queue or something..
        Throws:
        Exception
      • getStoreUsageHighWaterMark

        public final int getStoreUsageHighWaterMark()
      • setStoreUsageHighWaterMark

        public void setStoreUsageHighWaterMark​(int storeUsageHighWaterMark)
      • isFlowControlLogRequired

        protected boolean isFlowControlLogRequired()
      • getLog

        protected abstract org.slf4j.Logger getLog()
      • setSlowConsumerStrategy

        public void setSlowConsumerStrategy​(SlowConsumerStrategy slowConsumerStrategy)
      • setPrioritizedMessages

        public void setPrioritizedMessages​(boolean prioritizedMessages)
      • setInactiveTimeoutBeforeGC

        public void setInactiveTimeoutBeforeGC​(long inactiveTimeoutBeforeGC)
        Parameters:
        inactiveTimeoutBeforeGC - the inactiveTimeoutBeforeGC to set
      • isGcIfInactive

        public boolean isGcIfInactive()
        Returns:
        the gcIfInactive
      • setGcIfInactive

        public void setGcIfInactive​(boolean gcIfInactive)
        Parameters:
        gcIfInactive - the gcIfInactive to set
      • setGcWithNetworkConsumers

        public void setGcWithNetworkConsumers​(boolean gcWithNetworkConsumers)
        Indicate if it is ok to gc destinations that have only network consumers
        Parameters:
        gcWithNetworkConsumers -
      • isGcWithNetworkConsumers

        public boolean isGcWithNetworkConsumers()
      • markForGC

        public void markForGC​(long timeStamp)
        Specified by:
        markForGC in interface Destination
      • setReduceMemoryFootprint

        public void setReduceMemoryFootprint​(boolean reduceMemoryFootprint)
      • isReduceMemoryFootprint

        public boolean isReduceMemoryFootprint()
      • getOptimizeMessageStoreInFlightLimit

        public int getOptimizeMessageStoreInFlightLimit()
      • setOptimizeMessageStoreInFlightLimit

        public void setOptimizeMessageStoreInFlightLimit​(int optimizeMessageStoreInFlightLimit)
      • hasRegularConsumers

        protected boolean hasRegularConsumers​(List<Subscription> consumers)
      • isDLQ

        protected boolean isDLQ()
      • setPersistJMSRedelivered

        public void setPersistJMSRedelivered​(boolean persistJMSRedelivered)
      • isPersistJMSRedelivered

        public boolean isPersistJMSRedelivered()