qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Stitcher <astitc...@redhat.com>
Subject Re: Initial implementation of JMS like selectors for C++ messaging client and broker
Date Tue, 19 Mar 2013 14:09:21 GMT
On Mon, 2013-03-11 at 19:29 +0000, Gordon Sim wrote:
> On 03/11/2013 05:34 PM, Andrew Stitcher wrote:
> > On Mon, 2013-03-11 at 13:01 +0000, Gordon Sim wrote:
> >> On 03/04/2013 11:13 PM, Andrew Stitcher wrote:
> >>> 3. Selectors are specified on the as a "qpid.selector" property of links
> >>> in the messaging API address syntax: for instance an address might be
> >>> like
> >>> "queue; {link:{qpid.selector:\"color='blue' and price>100\"}}"
> >>
> >> Why is the 'qpid.' prefix used here?
> >
> > It's a placeholder, suggest something more appropriate and I will change
> > it.
> 
> If the intention is to warn users of something experimental or likely to 
> change, I would use 'x-' in line with some of the 0-10 specific options.
> 
> > Currently the implementation is incomplete (and qpid specific) and so I
> > didn't want to use something in the "amqp" space. When this
> > implementation completely implements the "standard" in [1] I'd expect to
> > use amqp.selector as the key.
> 
> For clarity, that isn't actually an AMQP standard, just a registered 
> extension (under the apache domain).

The selectors work has now progressed quite nicely and now implements
the entire selectors language (barring bugs of course). (Some of the
predefined identifiers are still missing though).

As this is the case I'm now thinking of casting this as not experimental
in the C++ messaging client API bindings.

So I'm going to change the actual filter used for amqp 1.0 to be the
registered extension code or symbol (apache.org:selector-filter:string).
However I think this makes a poor name for a convenience syntax! so I
propose just "selector" as in:

"queue; {link:{selector:\"color='blue' and price>100\"}}"

[possibly "jms-selector" or "apache-selector" might be better as they
qualify the type of selector in case we end up with more than on in the
qpid API and implementation]

NOTE: This is not intended to cover all possible amqp 1.0 filter specs
it is just a common convenience syntax to use selectors for both 0-10
and 1.0.

On the wire for 0-10 I think I will change the property to be called
"x-apache-selector" but that won't be visible to the user.

An important point here is that there almost certainly also needs to be
some new API in the messaging client API which allows you to add a
selector to a subscription without having to do annoying things to the
string of an address. Any suggestions here would be useful.

> ...
> Ideally there would be a generic way to specify the filter-set used for 
> 1.0 (less of an issue for 0-10 where arguments to the subscribe can 
> already be controlled). I'd like to avoid having to add explicit 
> handling into the client for every type of filter supported by whatever 
> broker connected if possible.
> 
> 1.0 certainly doesn't make that easy, but I was thinking of something 
> along the lines of e.g. 
> ...link:{filter:{'apache.org:selector-filter':'bar=foo', 
> 'otherfilter':'another spec here'}}... i.e. where there is some 
> indication of the descriptor to use.
> 

I have absolutely no objection to a syntax of this sort to specify a
general 1.0 filter. I am not planning to do this is in the shortst term
however and it is definitely orthogonal to a short form syntax for
selectors.

> ...
> > [1]
> > https://svn.apache.org/repos/asf/qpid/trunk/qpid/specs/apache-filters.xml#type-selector-filter
> 

Any more thoughts, strong objections etc?

Andrew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Mime
View raw message