feat: implement Kafka retry queue with hybrid retry strategy#63
Open
bashkirian wants to merge 1 commit into
Open
feat: implement Kafka retry queue with hybrid retry strategy#63bashkirian wants to merge 1 commit into
bashkirian wants to merge 1 commit into
Conversation
Add Kafka-based retry queue for payout orchestration with a hybrid retry strategy inspired by Hyperswitch: - Provider-level retry: quick retry same provider (short delays) - Global retry: fresh provider selection when all providers fail - Tiered backoff with jitter to prevent thundering herd Infrastructure: - Add Redpanda to docker-compose - Create payout-retry-provider, payout-retry-global, payout-retry-dlq topics Core changes: - Add kafka-go dependency - Create internal/queue package with Kafka publisher/consumer - Create internal/worker package with retry worker - Add retrying state and retry count tracking to payouts - Add migration for retry tracking columns Configuration: - Tiered delays: provider [1s, 5s, 15s], global [30s, 2m, 5m, 15m, 30m] - Random jitter up to 20% to prevent thundering herd Closes #62
61bb27d to
8095940
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Kafka-based retry queue for payout orchestration with a hybrid retry strategy inspired by Hyperswitch:
Infrastructure:
Core changes:
Configuration:
Closes #62