Skip to content

Releases: Midwayne/rabbitmq-go

v0.1.2

Choose a tag to compare

@Midwayne Midwayne released this 16 Jun 19:35
  • Consumer.ConsumeConcurrent for bounded concurrent message handling while
    preserving the same ack, retry and dead-letter semantics as Consume.
  • Consumer.ConsumeBodyConcurrent body-only adapter for concurrent consumers.
    workers <= 1 falls back to the sequential ConsumeBody path.
  • 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

Choose a tag to compare

@Midwayne Midwayne released this 13 Jun 05:44

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

v0.1.0 Pre-release
Pre-release

Choose a tag to compare

@Midwayne Midwayne released this 10 Jun 20:00
  • Core library (pkg/rabbitmq)
    • Publisher with publisher confirms, an idle confirm-channel pool
      (ChannelPoolSize, MaxChannelAge) and Publish/PublishMessage for
      simple and fully-specified publishes (headers, content properties,
      correlation/message IDs, per-message exchange override).
    • Mandatory routing support: unroutable messages surface as
      *PublishReturnedError with the returned message attached.
    • Consumer with automatic connection recovery, configurable prefetch,
      at-least-once in-place retries up to MaxRetries and dead-lettering of
      exhausted or non-retryable messages. Retry copies preserve AMQP properties
      and the original routing key.
    • NewNonRetryableError to send a message straight to the dead-letter queue,
      and a Check method for health probes.
    • Message delivery 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, fanout and
      headers exchange types, plus SkipExchangeDeclare for externally managed
      topologies.
    • Connection options for production use: TLS/mTLS (TLSClientConfig), custom
      SASL mechanisms, Heartbeat, DialTimeout/ConnectionTimeout,
      PublishConfirmTimeout and connection metadata via ConnectionName and
      ClientProperties.
    • All tunables live on Config with sane zero-value defaults; credentials are
      masked in logs.
  • Logging (pkg/rabbitmq/logging)
    • Pluggable Logger interface so no concrete logging framework enters the
      library, with Nop and log/slog adapters included.
  • Instrumentation
    • Generic rabbitmq.Instrumentation hook interface in the core library (no
      OpenTelemetry dependency) with a NopInstrumentation default.
  • 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.
  • 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.
  • Project tooling
    • Three-module layout (go.work workspace) 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.