Class RedeliveryPlugin

  • All Implemented Interfaces:
    Broker, BrokerPlugin, Region, org.apache.activemq.Service

    public class RedeliveryPlugin
    extends BrokerPluginSupport
    Replace regular DLQ handling with redelivery via a resend to the original destination after a delay A destination matching RedeliveryPolicy controls the quantity and delay for re-sends If there is no matching policy or an existing policy limit is exceeded by default regular DLQ processing resumes. This is controlled via sendToDlqIfMaxRetriesExceeded and fallbackToDeadLetter
    • Constructor Detail

      • RedeliveryPlugin

        public RedeliveryPlugin()
    • Method Detail

      • getRedeliveryPolicyMap

        public org.apache.activemq.broker.region.policy.RedeliveryPolicyMap getRedeliveryPolicyMap()
      • setRedeliveryPolicyMap

        public void setRedeliveryPolicyMap​(org.apache.activemq.broker.region.policy.RedeliveryPolicyMap redeliveryPolicyMap)
      • isSendToDlqIfMaxRetriesExceeded

        public boolean isSendToDlqIfMaxRetriesExceeded()
      • setSendToDlqIfMaxRetriesExceeded

        public void setSendToDlqIfMaxRetriesExceeded​(boolean sendToDlqIfMaxRetriesExceeded)
        What to do if the maxretries on a matching redelivery policy is exceeded. when true, the region broker DLQ processing will be used via sendToDeadLetterQueue when false, there is no action
        Parameters:
        sendToDlqIfMaxRetriesExceeded -
      • isFallbackToDeadLetter

        public boolean isFallbackToDeadLetter()
      • setFallbackToDeadLetter

        public void setFallbackToDeadLetter​(boolean fallbackToDeadLetter)
        What to do if there is no matching redelivery policy for a destination. when true, the region broker DLQ processing will be used via sendToDeadLetterQueue when false, there is no action
        Parameters:
        fallbackToDeadLetter -
      • sendToDeadLetterQueue

        public boolean sendToDeadLetterQueue​(ConnectionContext context,
                                             org.apache.activemq.broker.region.MessageReference messageReference,
                                             Subscription subscription,
                                             Throwable poisonCause)
        Description copied from interface: Broker
        A message needs to go the a DLQ
        Specified by:
        sendToDeadLetterQueue in interface Broker
        Overrides:
        sendToDeadLetterQueue in class BrokerFilter
        poisonCause - reason for dlq submission, may be null
        Returns:
        true if Message was placed in a DLQ false if discarded.