activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: ActiveMQ 5.6.0 - STOMP topics treated as queues if there is a space after 'destination: '
Date Wed, 11 Jul 2012 15:24:39 GMT
On Wed, 2012-07-11 at 08:14 -0700, Pete Redhead wrote: 
> Hi,
> 
> I have spotted an oddity when subscribing to STOMP topics in ActiveMQ 5.6.0.
> 
> In version 5.5.1 (and those prior), a space after the colon in the
> destination header was ignored. ie
> destination:/topic/test
> and
> destination: /topic/test
> were both treated as the same.
> 
> However, in version 5.6.0 the latter is treated as a queue with the name
> /queue//topic/test.
> 
> Is this intentional?
> 
> I appreaciate that the augmented BNF states that there is no space after the
> ':' but it seems a bit odd to convert the topic to a queue. Surely an error
> frame would be more suitable?
> The use of a space was not mentioned in version 1.0 of the STOMP spec, so
> this is causing some odd behaviour with older libraries.
> 
> Attached are the results of some quick tests showing differences between the
> two versions of ActiveMQ.
> 
> Thanks,
> Pete
> http://activemq.2283324.n4.nabble.com/file/n4653900/whitespace_test_5_5_1.txt
> whitespace_test_5_5_1.txt 
> http://activemq.2283324.n4.nabble.com/file/n4653900/whitespace_test_5_6_0.txt
> whitespace_test_5_6_0.txt 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-5-6-0-STOMP-topics-treated-as-queues-if-there-is-a-space-after-destination-tp4653900.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

There is a fix for this in the SNAPSHOT builds.  In general though the
STOMP specs allow spaces in the headers an so a value that starts with a
space is not the same as a non-space value so you need to ensure that
you only place spaces in when you mean it as the future AMQ brokers are
going to adhere more closely to this rule.  

-- 
Tim Bish
Sr Software Engineer | FuseSource Corp
tim.bish@fusesource.com | www.fusesource.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


Mime
View raw message