Skip to content

The AMQP 1.0 backend

Put a go/messaging bus on an AMQP 1.0 broker, with at-least-once delivery that survives a restart, on a topology the operator owns.

gitlab.com/phpboyscout/go/messaging-amqp is the AMQP 1.0 adapter for go/messaging. It speaks the protocol through Azure/go-amqp and keeps nothing broker-specific in its spine. What AMQP 1.0 cannot say (what a broker is configured to guarantee, what a queue is, whether a dead-letter address has a queue behind it) it asks through a Management the constructor requires. Artemis is the one that ships:

backend, err := amqp.New(ctx, amqp.Settings{URL: "amqp://broker:5672"}, amqp.Artemis{})

The result is a messaging.Backend you give to messaging.New. It offers AtMostOnce and AtLeastOnce, supports subject patterns, extends a lease, and is ordered. It does not replay, delay a redelivery, or answer requests: see Capabilities.

The operator owns the topology. The adapter attaches to an address and a durable queue that already exist, checks them, and refuses by name when they are wrong. It never creates a durable queue itself. See Topology it expects.

Release state

It is pre-1.0 and tracks the core. This section describes its main branch, and its changelog says which release carries each change.

The design is go/messaging's spec 0008, spec 0014 for the wire formats and spec 0015 for unreadable messages. Where this section and a spec differ, this section describes the code.

Tested against

Apache ActiveMQ Artemis 2.57.0 (apache/artemis:2.57.0-alpine), in a container, with the delivery-count and journal settings turned on. Nothing else has been run. See Tested versions before you point this at another broker.

Start here

Publish and receive with Artemis starts a broker, creates a durable queue, and takes a message through it, then shows what happens when a handler declines it.

Do a task

Understand it

Look something up