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 1090022 - [Selectors] Python client does not support selectors
Summary: [Selectors] Python client does not support selectors
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: python-qpid
Version: 3.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: 3.3
: ---
Assignee: Ernie
QA Contact: Messaging QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-22 12:06 UTC by Zdenek Kraus
Modified: 2015-01-20 15:14 UTC (History)
4 users (show)

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


Attachments (Terms of Use)

Description Zdenek Kraus 2014-04-22 12:06:25 UTC
Description of problem:
When selectors are supplied to python client, it fails with illegal key.


Version-Release number of selected component (if applicable):
python-qpid-0.22-13.el6

How reproducible:
100%


Steps to Reproduce:
1. ./drain "q;{create:always, link:{selector:\"a = TRUE\"}}"


Actual results:
[1]
Traceback (most recent call last):
  File "./drain", line 81, in <module>
    rcv = ssn.receiver(addr)
  File "<string>", line 6, in receiver
  File "/usr/lib/python2.6/site-packages/qpid/messaging/endpoints.py", line 633, in receiver
    raise e
qpid.messaging.exceptions.InvalidOption: error in options: link: selector: illegal key

Expected results:
[1]
selector will be applied in broker

Additional info:

Comment 1 Gordon Sim 2014-04-22 19:39:30 UTC
Though the python client doesn't support the 'shortcut' form, you can still specify it as a value for 'x-apache-selector' in the arguments for x-subscribe, e.g.

  ./drain "q;{create:always, link:{x-subscribe:{arguments:{'x-apache-selector':\"a = TRUE\"}}}}"

Comment 2 Zdenek Kraus 2014-04-23 05:18:05 UTC
Thank you, I will run tests with the 'x-apache-selector', but I really would like to have all clients use the same simple name 'selector', and IMO also others would like it too as well. We should keep it so unified as it could be.


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