Aidan Skinner wrote:
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.

What AMQP allows for queue names and what is sensible when interpreting a properties file are two separate things in my view.

I personally think that by default trailing whitespace in the properties file entry for a particular Destination _should_ be ignored.

If there is a desire to allow names with trailing spaces to be defined in the properties file in my view that should require some more explicit notation e.g. quotes around the name.

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to