Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Exponential Message Delivery Backoff in JetStream dispatcher #13697

Closed
2 tasks done
mfaizanse opened this issue Mar 23, 2022 · 7 comments · Fixed by #17102
Closed
2 tasks done

Use Exponential Message Delivery Backoff in JetStream dispatcher #13697

mfaizanse opened this issue Mar 23, 2022 · 7 comments · Fixed by #17102
Assignees
Labels
area/eventing Issues or PRs related to eventing

Comments

@mfaizanse
Copy link
Member

mfaizanse commented Mar 23, 2022

Pre-requisites

Description

Currently, the JetStream dispatcher will not NAK the msg if it fails to deliver it to the sink, so that it timeouts after AckWait period and then redeliver. It will keep on trying for some time with a constant backoff.

Once Exponential Message Delivery Backoff is supported by JetStream, we should use the exponential backoff in our JetStream dispatcher instead of constant backoff.

  • (configurable) maximum redelivery
  • (configurable) delivery timeout

Attachments

Related issue: #13625

@vpaskar
Copy link
Contributor

vpaskar commented May 19, 2022

Seems that the backoff functionality was already introduced in the v2.7.1: https://github.com/nats-io/nats-server/releases/tag/v2.7.1,

see the comment in the original NATS issue

@kyma-stale-bot
Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.

@kyma-stale-bot kyma-stale-bot bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 18, 2022
@k15r k15r removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 21, 2022
@github-actions
Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 22, 2022
@github-actions
Copy link

This issue has been automatically closed due to the lack of activity.

@github-actions github-actions bot added the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Sep 29, 2022
@k15r k15r removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. labels Sep 29, 2022
@k15r k15r reopened this Sep 29, 2022
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 28, 2022
@k15r k15r removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 1, 2022
@kyma-bot
Copy link
Contributor

This issue or PR has been automatically marked as stale due to the lack of recent activity.
Thank you for your contributions.

This bot triages issues and PRs according to the following rules:

  • After 60d of inactivity, lifecycle/stale is applied
  • After 7d of inactivity since lifecycle/stale was applied, the issue is closed

You can:

  • Mark this issue or PR as fresh with /remove-lifecycle stale
  • Close this issue or PR with /close

If you think that I work incorrectly, kindly raise an issue with the problem.

/lifecycle stale

@kyma-bot kyma-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 30, 2023
@mfaizanse mfaizanse removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Feb 1, 2023
@grischperl grischperl self-assigned this Mar 15, 2023
@grischperl grischperl linked a pull request Mar 16, 2023 that will close this issue
@grischperl
Copy link
Contributor

grischperl commented Apr 19, 2023

Now that JetStream supports both exponential backoff and NakWithDelay, it was decided to use the latter as the EC will respond with a Nak. The msg is put back in the queue and waits previously configured time (30sec) until the msg is send again (max. 100 retries).

Additionally, in case NakWithDelay fails and no response is sent, AckWait is configured to redeliver every 30sec.
#17102

The maximum redelivery and timeout are not yet configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/eventing Issues or PRs related to eventing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants