On Tue, Mar 31, 2009 at 4:40 AM, <[email protected]> wrote:
> + public void testQueueNamesWithTrailingSpaces() throws Exception
> + {
> + Queue queue = (Queue)ctx.lookup("QueueNameWithSpace");
> + assertEquals("QueueNameWithSpace",queue.getQueueName());
> + }
I missed the other commit with the actual calls to trim(), I'm not
sure this is the correct way to handle this case. The AMQP spec says:
"Queue names must have a length of between 1 and 255 characters
inclusive, must start with a digit, letter or underscores ('_')
character, and must be otherwise encoded in UTF-8." (AMQP 0-10, p226).
Your change adds an additional implementation rule that you cannot
have trailing spaces. Messages sent to 'ABC_' 'ABC__' and 'ABC' (s/_/
/g) all end up at the same place, and I'm really not sure that's
right.
- Aidan
--
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]