Skip to content

Fix durable RabbitMQ retry publication - #21

Merged
cedricve merged 1 commit into
mainfrom
fix/durable-rabbitmq-retries
Aug 24, 2026
Merged

cedricve merged 1 commit into
mainfrom
fix/durable-rabbitmq-retries

Conversation

@KilianBoute

@KilianBoute KilianBoute commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Description

This change fixes a reliability gap in the RabbitMQ retry pipeline where a message could be acknowledged before its retry publication had actually succeeded.

PipelineRetry now performs a synchronous republish to the consumer queue and only acknowledges the original delivery after the publish completes successfully. If the publish fails, the consumer exits without acknowledging the message, allowing RabbitMQ redelivery and reconnect logic to recover it instead of silently losing the payload.

The retry flow was also simplified to use the same reconnect-aware publish path used elsewhere in the queue implementation, improving consistency and resilience during broker interruptions.

In addition, retries and dead-letter handling are now fully covered by unit tests, including:

  • successful retry publication
  • propagation of publish failures
  • dead-letter routing after the retry cap is reached

The README was updated to document the stronger delivery guarantees and retry behavior.

Publish retry and dead-letter messages synchronously and return failures before acknowledging the original delivery. Add broker-free regression coverage for success, failure, and retry exhaustion.
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/queue/rabbitmq.go 54.54% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@cedricve
cedricve merged commit 859d0ad into main Aug 24, 2026
6 checks passed
@cedricve
cedricve deleted the fix/durable-rabbitmq-retries branch August 24, 2026 10:06
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.

2 participants