On 08/29/2014 03:12 PM, Rob Godfrey wrote:
In general, however, I think the subject is not the best fit for a mapping of the semantics of the 0.x "routing-key". The AMQP 1.0 spec defines subject as "A common field for summary information about the message content and purpose", rather than giving it and explicit or implicit routing semantics.
In my view, the 'routing key' in the old exchanges model is intended to be exactly such a logical categorisation of the messages content or purpose.
The "to" field is defined as "identifies the node that is the intended destination of the message" which definitely implies some routing semantics but does not make them explicit.
As you state, the to field identifies the destination. That is not what the old exchange types are about in my view. In the typical use cases for that old model, the sender doesn't want to describe who gets the queue, they merely want to indicate the type or purpose of the messages. It is then through the bindings that this type is mapped to the appropriate recipient(s).
If an application is designed around using AMQP 1.0, I would not normally expect them to be putting routing information in the subject field.
That depends on what you define to be routing information. I think it is a perfectly sensible approach to use the subject to indicate some sort of logical category and then have the broker be configured to 'route' messages according to that logical category.
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
