Interface DeadLetterStrategy

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      org.apache.activemq.command.ActiveMQDestination getDeadLetterQueueFor​(org.apache.activemq.command.Message message, Subscription subscription)
      Returns the dead letter queue for the given message and subscription.
      long getExpiration()  
      boolean isProcessExpired()  
      boolean isProcessNonPersistent()  
      boolean isSendToDeadLetterQueue​(org.apache.activemq.command.Message message)
      Allow pluggable strategy for deciding if message should be sent to a dead letter queue for example, you might not want to ignore expired or non-persistent messages
      void rollback​(org.apache.activemq.command.Message message)
      Allows for a Message that was already processed by a DLQ to be rolled back in case of a move or a retry of that message, otherwise the Message would be considered a duplicate if this strategy is doing Message Auditing.
      void setExpiration​(long expiration)
      The expiration value to use on messages sent to the DLQ, default 0
      void setProcessExpired​(boolean processExpired)  
      void setProcessNonPersistent​(boolean processNonPersistent)  
    • Method Detail

      • isSendToDeadLetterQueue

        boolean isSendToDeadLetterQueue​(org.apache.activemq.command.Message message)
        Allow pluggable strategy for deciding if message should be sent to a dead letter queue for example, you might not want to ignore expired or non-persistent messages
        Parameters:
        message -
        Returns:
        true if message should be sent to a dead letter queue
      • getDeadLetterQueueFor

        org.apache.activemq.command.ActiveMQDestination getDeadLetterQueueFor​(org.apache.activemq.command.Message message,
                                                                              Subscription subscription)
        Returns the dead letter queue for the given message and subscription.
      • isProcessExpired

        boolean isProcessExpired()
        Returns:
        true if processes expired messages
      • setProcessExpired

        void setProcessExpired​(boolean processExpired)
        Parameters:
        processExpired - the processExpired to set
      • isProcessNonPersistent

        boolean isProcessNonPersistent()
        Returns:
        the processNonPersistent
      • setProcessNonPersistent

        void setProcessNonPersistent​(boolean processNonPersistent)
        Parameters:
        processNonPersistent - the processNonPersistent to set
      • rollback

        void rollback​(org.apache.activemq.command.Message message)
        Allows for a Message that was already processed by a DLQ to be rolled back in case of a move or a retry of that message, otherwise the Message would be considered a duplicate if this strategy is doing Message Auditing.
        Parameters:
        message -
      • setExpiration

        void setExpiration​(long expiration)
        The expiration value to use on messages sent to the DLQ, default 0
      • getExpiration

        long getExpiration()