Skip to content

Reuse retry topic for the maxInterval delay of exponential backoff #2496

@jgslima

Description

@jgslima

Related to the discussion below:

#2484

Expected Behavior
In order to allow the configuration of an exponential backoff policy that keeps trying for a long time (say some hours), to have some way to use a single retry topic for the attempts corresponding to the maxInterval delay. This makes it more viable to configure the policy to keep trying for a long time because a lot of topics are not needed.

Current Behavior
When using exponential backoff, the number of needed retry topics is always the configured maxAttempts minus 1.

Context
For instance, when configuring the exponential backoff with initialInterval=1000, multiplier=2, and maxInterval=16000, in order to keep trying for one hour, one would need to configure maxAttempts as 229, and by default the needed retry topics would be:

  • -retry-1000
  • -retry-2000
  • -retry-4000
  • -retry-8000
  • -retry-16000-0
  • -retry-16000-1
  • -retry-16000-2
  • ...
  • -retry-16000-224

When using the strategy that reuses the retry topic for the same intervals, in the same configuration above the needed retry topics would be only 5:

  • -retry-1000
  • -retry-2000
  • -retry-4000
  • -retry-8000
  • -retry-16000

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions