diff --git a/deps/rabbitmq_stomp/DESIGN.md b/deps/rabbitmq_stomp/DESIGN.md index 7f6a894c02..4d4108b61c 100644 --- a/deps/rabbitmq_stomp/DESIGN.md +++ b/deps/rabbitmq_stomp/DESIGN.md @@ -1,43 +1,69 @@ # STOMP Adapter Enhancements -This document outlines proposed changes to the way in which the STOMP adapter handles destinations and routing. +This document outlines proposed changes to the way in which the STOMP +adapter handles destinations and routing. -IMPORTANT: Support for all existing custom headers will be removed. +IMPORTANT: Support for all existing custom headers will be removed. -## Destinations -In the current STOMP adapter, much of the destination configuration is handled by custom headers, including `routing_key` and `exchange`. +## Destinations + +In the current STOMP adapter, much of the destination configuration is +handled by custom headers, including `routing_key` and `exchange`. + +This design proposes to remove the custom headers, and use only the +`destination` header with compound values that define the exchange, +routing key and queue names. -This design proposes to remove the custom headers, and use only the `destination` header with compound values that define the exchange, routing key and queue names. ### Standard AMQP Destinations -Any exchange/queue or exchange/routing key combination can be accessed using destinations prefixed with `/exchange`. +Any exchange/queue or exchange/routing key combination can be accessed +using destinations prefixed with `/exchange`. -For `SUBSCRIBE` frames, a destination of the form `/exchange/[/]` can be used. This destination will: +For `SUBSCRIBE` frames, a destination of the form +`/exchange/[/]` can be used. This destination will: 1. Create an anonymous, auto-delete queue on `` exchange. -2. If `` is supplied, bind the queue to `` exchange using `` +2. If `` is supplied, bind the queue to `` exchange + using `` 3. Register a subscription against the queue, for the current STOMP session -For `SEND` frames, a destination of the form `/exchange/[/]` can be used. This destination will: +For `SEND` frames, a destination of the form +`/exchange/[/]` can be used. This destination will: 1. Send to exchange ``with the routing key `` + ### Queue Destinations -For simple queue destinations with round-robin delivery semantics, destinations of the form `/queue/` can be used. +For simple queue destinations with round-robin delivery semantics, +destinations of the form `/queue/` can be used. -For both `SEND` and `SUBSCRIBE` frames, these destinations will create the queue ``. +For both `SEND` and `SUBSCRIBE` frames, these destinations will create +the queue ``. -For `SEND` frames, the message will be sent to the default exchange with the routing key ``. For `SUBSCRIBE` frames, a subscription against the queue `` will be created for the current STOMP session. +For `SEND` frames, the message will be sent to the default exchange +with the routing key ``. For `SUBSCRIBE` frames, a subscription +against the queue `` will be created for the current STOMP +session. + +Given that both `SEND` and `SUBSCRIBE` frames cause the queue to be +created, the ordering constraint, client codes doesn't need to worry +about creating a subscription before sending messages. Furthermore, +the created queues are set to `auto-delete=false` so they will last +until they are deleted by the user. -Given that both `SEND` and `SUBSCRIBE` frames cause the queue to be created, the ordering constraint, client codes doesn't need to worry about creating a subscription before sending messages. Furthermore, the created queues are set to `auto-delete=false` so they will last until they are deleted by the user. ### Topic Destinations -For simple topic destinations which deliver a copy of each message to all active subscribers, destinations of the form `/topic/` can be used. +For simple topic destinations which deliver a copy of each message to +all active subscribers, destinations of the form `/topic/` can +be used. -For `SEND` frames, the message will be sent to the `amq.topic` exchange with the routing key ``. +For `SEND` frames, the message will be sent to the `amq.topic` +exchange with the routing key ``. -For `SUBSCRIBE` frames, an exclusive queue will be created and bound to the `amq.topic` exchange with routing key ``. A subscription will be created against the exclusive queue. +For `SUBSCRIBE` frames, an exclusive queue will be created and bound +to the `amq.topic` exchange with routing key ``. A subscription +will be created against the exclusive queue.