Skip to content

Fix/publisher concurrency#116

Merged
pmorelli92 merged 9 commits into
mainfrom
fix/publisher-concurrency
May 5, 2026
Merged

Fix/publisher concurrency#116
pmorelli92 merged 9 commits into
mainfrom
fix/publisher-concurrency

Conversation

@pmorelli92
Copy link
Copy Markdown
Owner

Publisher is now concurrency-safe. Publisher.Publish previously shared a single *amqp.Channel without synchronization, which could corrupt the AMQP frame stream when called from multiple goroutines. Publishes are now serialized with a mutex. Added a regression test to assert this (TestPublisherConcurrentPublish)

RabbitMQ 4 support. Bumped the test broker to rabbitmq:4-management and fixed retry counting against v4. In v4, basic.nack with requeue on a quorum queue no longer increments x-delivery-count but it increments the new x-acquired-count header instead. shouldRetry now reads x-acquired-count first and falls back to x-delivery-count, so retry limits work on both v3 and v4 brokers.

Dependency update.

@coveralls
Copy link
Copy Markdown

coveralls commented May 4, 2026

Coverage Status

coverage: 81.22% (-0.5%) from 81.763% — fix/publisher-concurrency into main

@pmorelli92 pmorelli92 merged commit f5258a6 into main May 5, 2026
4 checks passed
@pmorelli92 pmorelli92 deleted the fix/publisher-concurrency branch May 5, 2026 11:32
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