Skip to main content

AMQP support

The gateway serves AMQP 1.0. Compatibility lists the clients and test suites that we test the gateway with.

Supported​

FeatureNotes
TCP and TLS (amqps)TLS comes from the tls settings
WebSocketOn a listener with ws-path, subprotocol amqp
SASL PLAIN and ANONYMOUSThe listener maps the credential to a NATS user
Sessions and linksUp to 256 sessions per connection and 256 links per session
Heartbeats and idle time-outThe gateway closes a client that is silent for 60s
Send to an addressThe address is a NATS subject without wildcards
Anonymous relayThe to of each message names its subject
Presettled deliveryCore NATS
Unsettled deliveryOnly to addresses that a binding stores
Receive from an addressThe source can use the * and > wildcards
Queues (move mode)The default on a stored address
Copy mode and the topic capabilityEach link gets its own consumer
Queue browsing, such as a JMS QueueBrowserThe browser removes no messages
Operator queuesUse the source <address>::<queue>
JMS selectorsapache.org:selector-filter:string or amqp:sql-filter
Routesamqp.routes puts application properties in the subject
Outcomesaccepted, rejected, released and modified. See Things to know
Delivery countCounts only failed attempts, with amqp.delivery-counts
Credit, drain and echo
Request/reply and JMS temporary destinationsDynamic sources and targets give reply addresses
ttl and absolute-expiry-timeThe gateway does not deliver an expired message
Message fidelityAn AMQP receiver gets the sections that the sender sent
Message sizeUp to the NATS server's max_payload

Not supported​

  • Transactions. The gateway refuses the coordinator with amqp:not-implemented.
  • Shared subscriptions, and durable subscriptions other than the address's queue
  • Link recovery and resumed deliveries
  • rcv-settle-mode second. The gateway answers with first.
  • Filters other than selectors, such as no-local
  • Dead-letter addresses
  • Priority, scheduled delivery and message groups. The gateway carries these fields but does not act on them.
  • modified with message-annotations
  • Management nodes ($management) and claims-based security ($cbs)
  • SASL mechanisms other than PLAIN and ANONYMOUS
  • Copy mode, and selectors that the gateway evaluates, on a work-queue stream

Things to know​

  • Settlement decides storage. An unsettled send to an address that no binding stores is rejected with amqp:not-allowed. The gateway does not change it to a presettled send. A JMS persistent send to a temporary queue is refused for the same reason.
  • Receivers on an address share a queue. By default, every receiver on a stored address, on every gateway, reads one durable consumer, so each message goes to one receiver. A queue that no link uses for amqp.queue-inactive (1h) is removed. A new queue starts from the first message the stream holds on the address.
  • Outcomes decide redelivery. accepted and rejected end the message, so the gateway never delivers it again. released returns it to the queue. modified also returns it, and with delivery-failed it counts as a failed attempt. With undeliverable-here, only other receivers get it again.
  • A selector can have its own queue. A queue is named by the subjects it reads and by the part of its selector that the gateway evaluates. A message that one queue's receiver accepts is still delivered to the address's other queues. On a routed address, a selector that the subject alone answers, such as region = 'EU' on orders.{region}, shares the queue of a receiver on orders.EU.
  • Duplicates after a failure. When a link or connection ends, its unsettled deliveries go back to the queue and are delivered again. A delivery left unsettled for amqp.ack-wait (30s) is also sent again. A client that must not process a message twice should discard duplicates.
  • Send bodies as one data section. MQTT and NATS clients get any other body, such as the amqp-value that Qpid JMS uses for a TextMessage, in its AMQP encoding.
  • Addresses are subjects. The address orders.eu is the NATS subject orders.eu, which the MQTT topic orders/eu also reaches. See Mapping to NATS.