[rabbitmq-discuss] Regex field validation as per Amqp spec
Emile Joubert
emile at rabbitmq.com
Thu Oct 6 12:29:55 BST 2011
Hi Robin,
On 06/10/11 11:35, Emile Joubert wrote:
> On 05/10/11 15:02, Robin Harvey wrote:
>> (https://github.com/videlalvaro/Thumper), the RPC client uses an
>> auto-generated queue name for the response queue (from
>> queue.declare-ok), these look something like this:
>>
>> amq.gen-IuK1REOUDF8MxpANaTQWXQ==
>>
>> However, when I pass this to the basic.consume, my library complains
>> that this breaks validation of the amqp "queue-name" domain, which has
>> the following regex validation rule:
>>
>> ^[a-zA-Z0-9-_.:]*$
>
> This expression won't match queues that are auto-generated by rabbit.
> Queue names are "shortstr" in the AMQP 0-9-1 spec, which says:
Ignore everything I said. The library is correct to apply this
validation. It has just been pointed out to me that this validation rule
appears in the XML version of the specification:
https://www.amqp.org/confluence/download/attachments/720900/amqp0-9-1.xml
I will file a bug to restrict the range of characters that appear in
auto-generated queue names. Thanks for reporting this problem.
-Emile
More information about the rabbitmq-discuss
mailing list