AMQP support
The gateway serves AMQP 1.0. Compatibility lists the clients and test suites that we test the gateway with.
Supported
| Feature | Notes |
|---|---|
TCP and TLS (amqps) | TLS comes from the tls settings |
| WebSocket | On a listener with ws-path, subprotocol amqp |
| SASL PLAIN and ANONYMOUS | The listener maps the credential to a NATS user |
| Sessions and links | Up to 256 sessions per connection and 256 links per session |
| Heartbeats and idle time-out | The gateway closes a client that is silent for 60s |
| Send to an address | The address is a NATS subject without wildcards |
| Anonymous relay | The to of each message names its subject |
| Presettled delivery | Core NATS |
| Unsettled delivery | Only to addresses that a binding stores |
| Receive from an address | The source can use the * and > wildcards |
| Queues (move mode) | The default on a stored address |
Copy mode and the topic capability | Each link gets its own consumer |
Queue browsing, such as a JMS QueueBrowser | The browser removes no messages |
| Operator queues | Use the source <address>::<queue> |
| JMS selectors | apache.org:selector-filter:string or amqp:sql-filter |
| Routes | amqp.routes puts application properties in the subject |
| Outcomes | accepted, rejected, released and modified. See Things to know |
| Delivery count | Counts only failed attempts, with amqp.delivery-counts |
| Credit, drain and echo | |
| Request/reply and JMS temporary destinations | Dynamic sources and targets give reply addresses |
ttl and absolute-expiry-time | The gateway does not deliver an expired message |
| Message fidelity | An AMQP receiver gets the sections that the sender sent |
| Message size | Up 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-modesecond. 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.
modifiedwithmessage-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.
acceptedandrejectedend the message, so the gateway never delivers it again.releasedreturns it to the queue.modifiedalso returns it, and withdelivery-failedit counts as a failed attempt. Withundeliverable-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'onorders.{region}, shares the queue of a receiver onorders.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
datasection. MQTT and NATS clients get any other body, such as theamqp-valuethat Qpid JMS uses for aTextMessage, in its AMQP encoding. - Addresses are subjects. The address
orders.euis the NATS subjectorders.eu, which the MQTT topicorders/eualso reaches. See Mapping to NATS.