Interface TaskExecutionBackOff

All Known Implementing Classes:
ExponentialTaskExecutionBackOff, FixedTaskExecutionBackOff

public interface TaskExecutionBackOff
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final long
    Return value of nextBackOff(Object, RqueueMessage, int) that indicates that the task should not be executed further.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    nextBackOff(Object message, RqueueMessage rqueueMessage, int failureCount)
    Return the number of milliseconds to wait for the same message to be consumed by other consumers.
  • Field Details

  • Method Details

    • nextBackOff

      long nextBackOff(Object message, RqueueMessage rqueueMessage, int failureCount)
      Return the number of milliseconds to wait for the same message to be consumed by other consumers. (-1L) to indicate that no further enqueue should be made for the message.
      Parameters:
      message - message that's fetched
      rqueueMessage - raw message
      failureCount - number of times this message has failed.
      Returns:
      backoff in the millisecond.