Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1090024 - [Selectors] Java client ignore selectors
Summary: [Selectors] Java client ignore selectors
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java
Version: 3.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: Andrew Stitcher
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-22 12:08 UTC by Zdenek Kraus
Modified: 2014-10-27 01:12 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Apache JIRA QPID-5030 None None None Never

Description Zdenek Kraus 2014-04-22 12:08:01 UTC
Description of problem:
When selectors are supplied to java client, it's ignored. Broker doesn't even log the selector behaviour.


Version-Release number of selected component (if applicable):
qpid-java-client-0.22-6.el6

How reproducible:
100%


Steps to Reproduce:
#testing "a IS NULL" selector

# send true positive
1. java  -cp "/usr/share/java/qpid-deps/log4j-slf4j.jar:/usr/share/java/qpid-deps/qpid-deps-0.22.jar:/usr/share/java/log4j.jar:/usr/share/java/qpid-common-0.22.jar:/usr/share/java/qpid-client-0.22.jar:/var/dtests/node_data/clients:/var/dtests/node_data/reproducers" -Dlog4j.configuration=example.log4j org.apache.qpid.example.qc2_spout  --log-msgs dict --broker 192.168.6.3:5672 --connection-options "{  sasl_mechanisms : 'ANONYMOUS', protocol : 'amqp0-10' }" --count 1  "test_is_null;{create:always}

# send true negative
2. java  -cp "/usr/share/java/qpid-deps/log4j-slf4j.jar:/usr/share/java/qpid-deps/qpid-deps-0.22.jar:/usr/share/java/log4j.jar:/usr/share/java/qpid-common-0.22.jar:/usr/share/java/qpid-client-0.22.jar:/var/dtests/node_data/clients:/var/dtests/node_data/reproducers" -Dlog4j.configuration=example.log4j org.apache.qpid.example.qc2_spout  --log-msgs dict --broker 192.168.6.3:5672 --connection-options "{  sasl_mechanisms : 'ANONYMOUS', protocol : 'amqp0-10' }" --count 1 --property "a=1"   "test_is_null;{}"

# read with selector
3. java  -cp "/usr/share/java/qpid-deps/log4j-slf4j.jar:/usr/share/java/qpid-deps/qpid-deps-0.22.jar:/usr/share/java/log4j.jar:/usr/share/java/qpid-common-0.22.jar:/usr/share/java/qpid-client-0.22.jar:/var/dtests/node_data/clients:/var/dtests/node_data/reproducers" -Dlog4j.configuration=example.log4j org.apache.qpid.example.qc2_drain  --log-msgs dict --broker 192.168.6.3:5672 --connection-options "{  sasl_mechanisms : 'ANONYMOUS', protocol : 'amqp0-10' }" --count 0  "test_is_null;{'link': {'selector': \"a IS NULL\"}}"


Actual results:
[1] #all messages are drained
{'redelivered': False, 'reply_to': None, 'subject': None, 'id': None, 'correlation_id': None, 'priority': 4, 'durable': True, 'type': None, 'expiration': 0, 'timestamp': 1398165679979, 'properties': {'spout-id': 'e05798be-0c80-3659-b495-3e8cf3b4366e:0'}, 'content': None}
{'redelivered': False, 'reply_to': None, 'subject': None, 'id': None, 'correlation_id': None, 'priority': 4, 'durable': True, 'type': None, 'expiration': 0, 'timestamp': 1398165693112, 'properties': {'a': '1', 'spout-id': 'f76774cb-d6c3-37bd-a295-72ceefc68abe:0'}, 'content': None}



Expected results:
[1] # only message where a is null should be drained
{'redelivered': False, 'reply_to': None, 'subject': None, 'id': None, 'correlation_id': None, 'priority': 4, 'durable': True, 'type': None, 'expiration': 0, 'timestamp': 1398165679979, 'properties': {'spout-id': 'e05798be-0c80-3659-b495-3e8cf3b4366e:0'}, 'content': None}

Additional info:
# qpid debug log
2014-04-22 13:21:41 [Model] debug Create subscription. queue:test_is_null destination:1 user:anonymous rhost:qpid.192.168.6.3:5672-192.168.6.3:60147 exclusive:F
2014-04-22 13:21:41 [Broker] debug next() called for invalid cursor, index started at 0 (of 2)
2014-04-22 13:21:41 [Broker] debug in next(), cursor set to 1
2014-04-22 13:21:41 [Broker] debug in next(), returning message at 1
2014-04-22 13:21:41 [Broker] debug Subscription 1 on anonymous.5db99ead-d2a1-4df5-b0f7-595bedeeffbc has sufficient  credit for message of 119 bytes: messages: 500 (from window of 500) bytes: unlimited
2014-04-22 13:21:41 [Broker] debug Attempting to acquire message 1 from 'test_is_null' with state 1
2014-04-22 13:21:41 [Broker] debug Message 1 retrieved from 'test_is_null'
2014-04-22 13:21:41 [Broker] debug Credit allocated for 1 on anonymous.5db99ead-d2a1-4df5-b0f7-595bedeeffbc, was messages: 500 (from window of 500) bytes: unlimited now messages: 499 (from window of 500) bytes: unlimited
2014-04-22 13:21:41 [Broker] debug next() called for cursor at 1, index set to 1 (of 2)
2014-04-22 13:21:41 [Broker] debug in next(), cursor set to 2
2014-04-22 13:21:41 [Broker] debug in next(), returning message at 2
2014-04-22 13:21:41 [Broker] debug Subscription 1 on anonymous.5db99ead-d2a1-4df5-b0f7-595bedeeffbc has sufficient  credit for message of 125 bytes: messages: 499 (from window of 500) bytes: unlimited
2014-04-22 13:21:41 [Broker] debug Attempting to acquire message 2 from 'test_is_null' with state 1
2014-04-22 13:21:41 [Broker] debug Message 2 retrieved from 'test_is_null'
2014-04-22 13:21:41 [Broker] debug Credit allocated for 1 on anonymous.5db99ead-d2a1-4df5-b0f7-595bedeeffbc, was messages: 499 (from window of 500) bytes: unlimited now messages: 498 (from window of 500) bytes: unlimited
2014-04-22 13:21:41 [Broker] debug next() called for cursor at 2, index set to 2 (of 2)
2014-04-22 13:21:41 [Broker] debug no message to return from next
2014-04-22 13:21:41 [Broker] debug No messages to dispatch on queue 'test_is_null'
2014-04-22 13:21:41 [Broker] debug next() called for cursor at 2, index set to 2 (of 2)
2014-04-22 13:21:41 [Broker] debug no message to return from next
2014-04-22 13:21:41 [Broker] debug No messages to dispatch on queue 'test_is_null'
2014-04-22 13:21:41 [Broker] debug clean(): 1 messages remain; head is now 0
2014-04-22 13:21:41 [Broker] debug DeliveryRecord::setEnded() id=2
2014-04-22 13:21:41 [Broker] debug Accepted 2
2014-04-22 13:21:41 [Broker] debug clean(): 0 messages remain; head is now 0
2014-04-22 13:21:41 [Broker] debug DeliveryRecord::setEnded() id=3
2014-04-22 13:21:41 [Broker] debug Accepted 3
2014-04-22 13:21:41 [Broker] debug next() called for cursor at 2, index set to 0 (of 0)
2014-04-22 13:21:41 [Broker] debug no message to return from next
2014-04-22 13:21:41 [Broker] debug No messages to dispatch on queue 'test_is_null'
2014-04-22 13:21:41 [Model] debug Delete subscription. destination:1 user:anonymous rhost:qpid.192.168.6.3:5672-192.168.6.3:60147
2014-04-22 13:21:41 [Broker] debug anonymous.5db99ead-d2a1-4df5-b0f7-595bedeeffbc: detached on broker.
2014-04-22 13:21:41 [Model] debug Delete connection. user:anonymous rhost:qpid.192.168.6.3:5672-192.168.6.3:60147


Note You need to log in before you can comment on or make changes to this bug.