Skip to content

Errors

Source: settings.go, artemis.go, backend.go, session.go, source.go. The sentinels are built with errors.NewSentinel from gitlab.com/phpboyscout/go/errors; test for them with errors.Is.

Sentinel Code Returned by When
ErrNotFound messaging_amqp.not_found a Management a queue or address does not exist. The backend turns it into ErrNoQueue for a subscription's queue.
ErrNoQueue messaging_amqp.no_queue Subscribe the AtLeastOnce queue does not exist. The bus attaches and never creates.
ErrUnrouted messaging_amqp.unrouted Publish nothing on the broker receives from the subject's address.
ErrClosed messaging_amqp.closed Publish the session has been closed.
ErrManagementRefused messaging_amqp.management_refused Artemis the broker refused a management request for a reason other than a missing object.

Other errors worth recognising

Where Error text begins Cause
New messaging-amqp: a Management is required the second argument was nil.
New messaging-amqp: dialling the broker is unreachable or refused the login, for example SASL PLAIN auth failed.
New messaging-amqp: reading the broker's features the Management could not read the broker's configuration.
Subscribe messaging-amqp: <mode> delivery, wrapping messaging.ErrNotSupported a mode other than AtMostOnce or AtLeastOnce.
Subscribe the verification messages see Topology it expects.
Publish messaging-amqp: encoding the event the writer format refused the event.
Publish messaging-amqp: the broker did not accept a publish to "<subject>": <state> the disposition was anything but accepted.
settlement messaging-amqp: accepting the message, rejecting the message, handing back the message the broker call settling a delivery failed.
settlement wraps messaging.ErrSettlementRefused a word arrived after the source was retired.

ErrNoQueue, ErrUnrouted and ErrClosed carry their context in a wrapping message, for example address "zz.nothing": messaging-amqp: no queue on the broker receives from this subject's address; a publish to it would be accepted and kept by nobody.