Skip to content

Preserve failed messages with classified retries and configurable DLQs - #7

Merged
Chandra179 merged 1 commit into
mainfrom
fix/messaging-failure-policy
Nov 1, 2026
Merged

Chandra179 merged 1 commit into
mainfrom
fix/messaging-failure-policy

Conversation

@Chandra179

@Chandra179 Chandra179 commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

Failed Kafka records could advance committed offsets without a DLQ, and RabbitMQ could acknowledge originals after unroutable replacement publications. Consumers now preserve unfinished input, classify application failures, bound retries, and verify dead-letter transfers before settling originals. A card-service outage can stop consumption and enter controlled health probes instead of repeatedly republishing the backlog.

Changes:

  • Add optional RetryPolicy classifiers, attempt/time budgets, exponential backoff with jitter, and RecoveryPolicy probes.
  • Add per-consumer DeadLetterConfig with existing/provisioned topology, retention/capacity settings, metadata, and startup validation.
  • Commit Kafka offsets only for processed or successfully parked records; require manual group commits and synchronous acknowledged DLQ writes.
  • Use persistent, mandatory, confirmed RabbitMQ transfers on isolated connections bounded by concurrency and timeout; settle batches individually and stop reconnect waits on client shutdown.
  • Add regression tests, opt-in broker tests, README examples, and architecture decisions.

Compatibility:

  • Unknown failures now stop and remain available for redelivery, even with a DLQ configured.
  • Kafka DLQProducer, RabbitMQ RetryEnabled broker retry loops, and auto-ack consumption require migration to the documented configuration.
  • Existing RabbitMQ topology verification requires declaration/binding permissions. Delivery remains at least once; duplicate handling must be idempotent.

Validation:

  • Go parsing/formatting passed for all 19 changed Go files; whitespace checks passed.
  • Exported patch applies to the exact upstream revision 1bdbb4c.
  • make test and make check were attempted in both modules but could not execute: this workspace has no Go toolchain (the command named go is an unrelated desktop game).
  • Compilation, unit/race tests, lint, vulnerability scans, and real-broker tests remain unverified. CI results must not be interpreted as passing unless actual job steps execute.

CI observation: run 41275519688 failed all eight matrix jobs before any runner was assigned or job step executed. Job logs return BlobNotFound. This matches the earlier main-branch runs and provides no compilation or test result; the underlying Actions failure is unconfirmed.

…e DLQs

Add bounded in-place retries, dependency recovery probes, verified dead-letter
configuration, Kafka offset preservation, and confirmed mandatory RabbitMQ
transfers. Include regression tests, optional broker tests, and migration docs.

Parsing, formatting, whitespace and patch-application checks passed locally.
Go compilation and test execution are pending an available toolchain.
@Chandra179
Chandra179 merged commit 2b58a2c into main Nov 1, 2026
1 of 9 checks passed
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