Interface JmsRedeliveryPolicy

All Known Implementing Classes:
JmsDefaultRedeliveryPolicy

public interface JmsRedeliveryPolicy
Interface for a Redelivery Policy object used to determine how many times a Message can be redelivered by the client before being dropped.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    int
    Returns the configured maximum redeliveries that a message will be allowed to have before it is rejected by this client for a given destination.
    int
    Returns the configured outcome that will be used when rejecting the message by this client for the given destination when the message has reached the maximum redelivery threshold.
  • Method Details

    • copy

    • getMaxRedeliveries

      int getMaxRedeliveries(JmsDestination destination)
      Returns the configured maximum redeliveries that a message will be allowed to have before it is rejected by this client for a given destination.

      A return value of less than zero is treated as if there is no maximum value set.

      Parameters:
      destination - the destination that the subscription is redelivering from.
      Returns:
      the maximum number of redeliveries allowed before a message is rejected.
    • getOutcome

      int getOutcome(JmsDestination destination)
      Returns the configured outcome that will be used when rejecting the message by this client for the given destination when the message has reached the maximum redelivery threshold. The outcome returned here maps to AMQP outcomes using the following integer values:

      • ACCEPTED = 1
      • REJECTED = 2
      • RELEASED = 3
      • MODIFIED_FAILED = 4
      • MODIFIED_FAILED_UNDELIVERABLE = 5

      Parameters:
      destination - the destination that the subscription is redelivering from.
      Returns:
      the outcome to use when rejecting messages.