Bug 618865

Summary: Add support in the JMS client for "mode" option defined in the new addressing format
Product: Red Hat Enterprise MRG Reporter: Rajith Attapattu <rattapat+nobody>
Component: qpid-javaAssignee: Rajith Attapattu <rattapat+nobody>
Status: CLOSED CURRENTRELEASE QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: jross
Target Milestone: 1.3   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: 0.10 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-25 10:49:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Rajith Attapattu 2010-07-27 22:00:22 UTC
Description of problem:
The mode option allows to specify whether messages should be consumed or read in browsing mode. 
All though JMS has a QueueBrowser class, it only allows messages to be browsed synchronously.
The above option allows an end-user to leverage the MessageListener to browse message asynchronously.

Ex. The following shows an example addressing string which creates a browse mode Consumer on a ring queue.

"my-ring-queue; {create: always, mode: browse, " +
                "node: {x-bindings: [{exchange : 'amq.direct', key : test}], " +
                       "x-declare:{'qpid.policy_type':ring, 'qpid.max_count':2}}}";

Comment 1 Rajith Attapattu 2010-07-29 13:28:23 UTC
Fixed in upstream (tracked via QPID-2738)

Git commit URL


Steps to test
To test this, you could use the address given in the description.

1. run o.a.q.example.Drain -f <address-string>
2. Send two messages to amq.direct exchange with rk=test
   Ex o.a.q.example.Spout -c MSG$num "amq.direct/test"

3. Observe that Drain prints the examples.
4. Shutdown drain and restart it, you should see the two messages again.