Skip to content

How does RetryAgent work? #2945

Closed Answered by metcoder95
acommodari asked this question in Q&A
Mar 11, 2024 · 1 comments · 8 replies
Discussion options

You must be logged in to vote

👋
Indeed more in-depth examples in the docs will be really valuable.

To achieve what you are looking for, you can rely merely on the options set for your client/dispatcher to handle the timeout settings. On a timeout, and in combination with the RetryHandler, it will lead to a failure that the handler understands and will react accordingly.

To create an exponential-backoff-based Agent, it's enough to just pass the retry callback when creating the RetryAgent/Handler; the context will pass you the current number of retries and the last timeout applied before the last retry. You can use these heuristics to alter the way the timeout is calculated and indicate to the handler when to move forwa…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@acommodari
Comment options

@metcoder95
Comment options

@acommodari
Comment options

@acommodari
Comment options

@metcoder95
Comment options

Answer selected by acommodari
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants