Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-1067
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Timothy Bish
Reporter: Susan Javurek
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

Space at end of queue name is not honored by consumers

Created: 24/Jan/12 10:18 PM   Updated: 03/Feb/12 06:48 PM
Component/s: None
Affects Version/s: 5.5.1-fuse-01-11
Fix Version/s: 5.6.0-fuse-00-00

File Attachments: None
Image Attachments:

1. jconsole.jpg
(169 kB)

External Issue URL: https://issues.apache.org/jira/browse/AMQ-3586


 Description  « Hide
Hi,

Matt is on-site for a potential customer and noted the following behavior in 5.5.1-fuse-01-20:

1. Create a queue with a space on the end.. "MyQueue "
2. Publish X number of messages to "MyQueue "
3. Create a queue, same name w/o space on the end. "MyQueue"
4. Publish Y number of messages to "MyQueue"
5. Attempt to consume messages from "MyQueue" fails.

To reproduce the issue here, use the producer demo:

1. ant producer -Durl=tcp://Susan-Javureks-MacBook-Pro-3.local:61616 -Dsubject="TEST.FOO " -Dmax=5
2. ant producer -Durl=tcp://Susan-Javureks-MacBook-Pro-3.local:61616 -Dsubject="TEST.FOO" -Dmax=5

Via jconsole, you'll see two queues created. Looking closely at the name attribute, you can see the space if you highlight the entire name (see attached jconsole.jpg).

3. ant consumer -Durl=tcp://Susan-Javureks-MacBook-Pro-3.local:61616 -Dsubject="TEST.FOO" -Dmax=10

Will work grab all 10 messages regardless of the "space" at the end:

Susan-Javureks-MacBook-Pro-3:example sjavurek$ ant consumer -Durl=tcp://Susan-Javureks-MacBook-Pro-3.local:61616 -Dsubject="TEST.FOO" -Dmax=10
Buildfile: /Users/sjavurek/Fuse/activemq/5.5.1/apache-activemq-5.5.1-fuse-01-20/example/build.xml

init:

compile:

consumer:
     [echo] Running consumer against server at $url = tcp://Susan-Javureks-MacBook-Pro-3.local:61616 for subject $subject = TEST.FOO
     [java] Connecting to URL: tcp://Susan-Javureks-MacBook-Pro-3.local:61616 (:)
     [java] Consuming queue: TEST.FOO
     [java] Using a non-durable subscription
     [java] Running 1 parallel threads
     [java] [Thread-3] We are about to wait until we consume: 10 message(s) then we will shutdown
     [java] [Thread-3] Received: 'Message: 0 sent at: Tue Jan 24 17:14:27 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 1 sent at: Tue Jan 24 17:14:27 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 2 sent at: Tue Jan 24 17:14:27 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 3 sent at: Tue Jan 24 17:14:27 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 4 sent at: Tue Jan 24 17:14:27 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 0 sent at: Tue Jan 24 17:14:35 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 1 sent at: Tue Jan 24 17:14:35 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 2 sent at: Tue Jan 24 17:14:35 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 3 sent at: Tue Jan 24 17:14:35 EST 2012  ...' (length 1000)
     [java] [Thread-3] Received: 'Message: 4 sent at: Tue Jan 24 17:14:35 EST 2012  ...' (length 1000)
     [java] [Thread-3] Closing connection
     [java] All threads completed their work

BUILD SUCCESSFUL
Total time: 2 seconds
Susan-Javureks-MacBook-Pro-3:example sjavurek$

The queue size for both queues goes to 0. Running consumer with -Dmax=1 for -Dsubject="TEST.FOO " twice in a row results in one message pulled of "TEST.FOO " and one from "TEST.FOO".

Seems a bit confused ....



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Timothy Bish added a comment - 03/Feb/12 06:48 PM
The code will now trim off any extra whitespace at the start or end of the destination name to prevent this sort of situation from happening again.