Skip to content

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.