Use different AMQP address format for v1 and v2 to distinguish between v1 and v2 address formats.
Previously, v1 and v2 address formats overlapped and behaved differently for example for:
/queue/:queue
/exchange/:exchange
This PR changes the v2 format to:
/e/:exchange/:routing-key
/e/:exchange
/q/:queue
to distinguish between v1 and v2 addresses.
This allows to call rabbit_deprecated_features:is_permitted(amqp_address_v1)
only if we know that the user requests address format v1.
Note that rabbit_deprecated_features:is_permitted/1 should only
be called when the old feature is actually used.
Use percent encoding / decoding for address URI format v2.
This allows to use any UTF-8 encoded characters including slashes (/)
in routing keys, exchange names, and queue names and is more future
safe.
Although less user friendly, the new address format is kept short to:
reduce the per message network bandwidth
reduce the per message disk overhead (note that the bare message including the to field must be stored unaltered)
or to set some capabilities or properties when attaching a link denoting that address format v2 is used.
Neither of these alternatives is really more user friendly compared to the short version.
This PR is a refinement of https://github.com/rabbitmq/rabbitmq-server/pull/10873.
Use different AMQP address format for v1 and v2 to distinguish between v1 and v2 address formats.
Previously, v1 and v2 address formats overlapped and behaved differently for example for:
This PR changes the v2 format to:
to distinguish between v1 and v2 addresses.
This allows to call
rabbit_deprecated_features:is_permitted(amqp_address_v1)
only if we know that the user requests address format v1.Note that
rabbit_deprecated_features:is_permitted/1
should only be called when the old feature is actually used.Use percent encoding / decoding for address URI format v2. This allows to use any UTF-8 encoded characters including slashes (
/
) in routing keys, exchange names, and queue names and is more future safe.Although less user friendly, the new address format is kept short to:
to
field must be stored unaltered)The alternative would have been something like:
or to set some capabilities or properties when attaching a link denoting that address format v2 is used. Neither of these alternatives is really more user friendly compared to the short version.
Docs PR updating https://www.rabbitmq.com/docs/next/amqp#address will follow soon.