Releases: Midwayne/rabbitmq-go
Releases · Midwayne/rabbitmq-go
Release list
v0.1.2
Consumer.ConsumeConcurrentfor bounded concurrent message handling while
preserving the same ack, retry and dead-letter semantics asConsume.Consumer.ConsumeBodyConcurrentbody-only adapter for concurrent consumers.
workers <= 1falls back to the sequentialConsumeBodypath.- Broker-backed integration coverage for concurrent body consumers, including
parallel handler execution, effective prefetch raising, retry handling and
dead-lettering on exhausted concurrent failures.
v0.1.1
Added
- Publisher.DeclareQueueTopology(queueName, routingKey string) error - declares a durable queue, its binding to the configured exchange, and its dead-letter exchange/queue from the publisher side. The declaration is argument-identical to what a Consumer declares in Consume, so whichever side starts first, the other redeclares without a PRECONDITION_FAILED conflict. Declarations are idempotent.
- This closes a gap where messages published before any consumer had ever started were dropped by the broker as unroutable. Declaring the topology up front means those early publishes are buffered in the queue until a consumer attaches.
v0.1.0
- Core library (
pkg/rabbitmq)Publisherwith publisher confirms, an idle confirm-channel pool
(ChannelPoolSize,MaxChannelAge) andPublish/PublishMessagefor
simple and fully-specified publishes (headers, content properties,
correlation/message IDs, per-message exchange override).- Mandatory routing support: unroutable messages surface as
*PublishReturnedErrorwith the returned message attached. Consumerwith automatic connection recovery, configurable prefetch,
at-least-once in-place retries up toMaxRetriesand dead-lettering of
exhausted or non-retryable messages. Retry copies preserve AMQP properties
and the original routing key.NewNonRetryableErrorto send a message straight to the dead-letter queue,
and aCheckmethod for health probes.Messagedelivery type exposing body, headers, content properties, routing
key, exchange, redelivery flag and retry count; the library owns ack/nack
semantics.- Exchange/queue topology declaration with
direct,topic,fanoutand
headersexchange types, plusSkipExchangeDeclarefor externally managed
topologies. - Connection options for production use: TLS/mTLS (
TLSClientConfig), custom
SASLmechanisms,Heartbeat,DialTimeout/ConnectionTimeout,
PublishConfirmTimeoutand connection metadata viaConnectionNameand
ClientProperties. - All tunables live on
Configwith sane zero-value defaults; credentials are
masked in logs.
- Logging (
pkg/rabbitmq/logging)- Pluggable
Loggerinterface so no concrete logging framework enters the
library, withNopandlog/slogadapters included.
- Pluggable
- Instrumentation
- Generic
rabbitmq.Instrumentationhook interface in the core library (no
OpenTelemetry dependency) with aNopInstrumentationdefault.
- Generic
- OpenTelemetry adapter (
pkg/otelrabbitmq, separate module)- Publish and consume spans, handler duration and error metrics, retry-count
and message-size attributes, ack/nack/requeue/retried and dead-letter
outcomes and W3C trace-context propagation through AMQP headers. - Side-effect-free: never mutates global OpenTelemetry state; uses globals
only as defaults when no providers are supplied.
- Publish and consume spans, handler duration and error metrics, retry-count
- Integration test module (
integration/, separate module)- Broker-backed end-to-end suite covering delivery, confirms, retries,
dead-lettering, connection recovery and trace propagation, running against
a throwaway RabbitMQ container via testcontainers with Toxiproxy-based
fault-injection tests.
- Broker-backed end-to-end suite covering delivery, confirms, retries,
- Project tooling
- Three-module layout (
go.workworkspace) keeping OpenTelemetry and test
dependencies out of the core library's dependency graph; published module
files are replace-free. - Makefile targets for build, unit/race tests, vet, golangci-lint v2,
govulncheck, merged unit+integration coverage (cover-all) and an
external-module installability check, wired into GitHub Actions CI.
- Three-module layout (