Skip to content

feat: add configurable retries for emitters - #658

Open
kahirokunn wants to merge 9 commits into
cloudevents:mainfrom
kahirokunn:split/emitter-retry
Open

kahirokunn wants to merge 9 commits into
cloudevents:mainfrom
kahirokunn:split/emitter-retry

Conversation

@kahirokunn

Copy link
Copy Markdown
Contributor

Proposed Changes

Add opt-in retries with withRetry().

Description

Retry temporary HTTP and network failures with capped randomized exponential backoff, honoring Retry-After for 429 and 503 responses. Each attempt sends the same CloudEvent, so receivers need to handle duplicates.

Depends on #657.

@kahirokunn
kahirokunn marked this pull request as ready for review October 13, 2026 12:28
@github-actions

Copy link
Copy Markdown
Contributor

This pull request is stale because it has been open 30 days with no activity.

@kahirokunn

Copy link
Copy Markdown
Contributor Author

keep

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Signed-off-by: kahirokunn <okinakahiro@gmail.com>
Keep the HTTP transport single-attempt and let applications opt into
retrying temporary failures with a reusable emitter wrapper. Preserve
the event and send options across attempts, bound backoff waits and honor
Retry-After for 429 and 503 responses.

Default retries recognize temporary HTTP failures, while custom transports
can supply their own predicate and delay. Aborted sends are not retried,
and a per-send signal can interrupt the wait before another attempt.

Signed-off-by: kahirokunn <okinakahiro@gmail.com>
@kahirokunn

Copy link
Copy Markdown
Contributor Author

The conflict has been resolved.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant