[openamq-dev] Content Based Routing
Pieter Hintjens
ph at imatix.com
Mon Sep 3 17:42:45 CEST 2007
On 9/3/07, Malinga <malingajava at yahoo.com> wrote:
> In our previous products we used ActiveMQ as our middleware and it had a
> concept called message selection based on the header fields. So my question
> is in OpenAMQ do we have such implementation ?
In fact when we designed AMQP we made this kind of operation a key
feature, and designed the Queue-to-Exchange concepts to allow
extremely fast selection of messages by headers.
OpenAMQ implements the headers exchange which matches on message header fields.
The way this works is:
- you create one queue per subscriber
- you bind the queue to the amq.headers exchange once for each
criteria you want to match
- publishers send their messages to amq.headers
So by specifying the criteria up-front, you can get extreme gains in
performance. This is AMQP's basic design, and that's what you get in
OpenAMQ.
We estimate that the matching engine can match several million
messages per second. By comparison, any technique that selects by
scanning queues is going to be limited to a few hundred per second, or
less when the queues get large.
-Pieter
More information about the openamq-dev
mailing list