activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: Message Filtering
Date Fri, 07 Jul 2006 16:00:34 GMT
Hi Stephs

On 7/7/06, stephans <> wrote:
> Hi folks,
> i am currently writing my master thesis on improving filter performance in
> publish/subscribe environments.

Interesting! :)

> Can anyone of you outline how filtering is
> done in activemq, i.e. if you are using the counting algorithm or more
> advanced approaches like building a matching tree from subscriptions like
> mentioned in the paper by aguilera/strom or something like that?
> I would appreciate any answers from you.

The code for the filtering is all here BTW...

for topic wildcards like A.B.C or A.B.* or A.> and so forth we use a
DestinationMap which is a matching tree of the path names...

but for selectors (arbitrary SQL 92 predicates on the message which
the variables usually refer to headers) are implemented typically by
just evaluating a usual predicate tree, per consumer right now.

The only tricky area is that often consumers pull messages when they
have spare buffers; so an optimised filter engine with some kind of
predicate tree would have to work in a pull rather than push mode

e.g. we could evaluate all the filters when a message comes in &
remember which consumer match. Or what we do right now is only
evaluate a filter when there is a consumer who is attempting to fill
its buffer of available messages. So maybe something in between the



View raw message