Bug 51419

Summary: JMS Subscriber: ability to use Selectors
Product: JMeter Reporter: Yaroslav <slavko_h>
Component: MainAssignee: JMeter issues mailing list <issues>
Severity: enhancement CC: p.mouawad
Priority: P2    
Version: 2.4   
Target Milestone: ---   
Hardware: All   
OS: All   
Attachments: Demo Test Plan

Description Yaroslav 2011-06-22 18:17:13 UTC
The current implementation does not support to get a JMS message from a queue by its property.

It could be implemented by adding simple "Selectors" item right after "Destination" item.

In this case User could add "JMSType = `car' AND color = `blue' AND weight > 2500" for instance.

Below are some requirements from JMS standards:

A JMS message selector allows a client to specify by message header the messages it's interested in. Only messages whose headers match the selector are delivered. The semantics of not delivered differ a bit depending on the MessageConsumer being used (see QueueReceiver and TopicSubscriber). 

Message selectors cannot reference message body values. 

A message selector matches a message when the selector evaluates to true when the message's header field and property values are substituted for their corresponding identifiers in the selector. 

A message selector is a String, whose syntax is based on a subset of the SQL92 conditional expression syntax.
Comment 1 Yaroslav 2011-06-22 18:36:36 UTC
It User's responsibility to provide correct and valid string for that.
Comment 2 Philippe Mouawad 2011-10-15 14:43:28 UTC
Date: Sat Oct 15 14:42:43 2011
New Revision: 1183653

URL: http://svn.apache.org/viewvc?rev=1183653&view=rev
Bug 51419 - JMS Subscriber: ability to use Selectors

Comment 3 Yaroslav 2011-10-17 16:54:38 UTC
Is it possible to have any "help" how to use it with current implementation?
Comment 4 Philippe Mouawad 2011-10-17 17:45:36 UTC
Created attachment 27798 [details]
Demo Test Plan

Here is a test plan that works with nightly build integrating this feature.

Notice that message has property called type = ORDER
and selector is set to type='ORDER' meaning subscriber will only extract messages posted with this property.

Comment on what you exactly need.
Comment 5 Yaroslav 2011-10-18 19:22:04 UTC
Verified r1183653

The implementation looks perfect.

Just one note - would be nice to specify in Help what is max length for "JMS Selector" field.
Comment 6 Philippe Mouawad 2012-01-15 13:42:00 UTC
Thanks for verification.
Marking issue as RESOLVED to avoid it appearing in Bug Report.