You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Jiang <zj...@163.com> on 2007/06/12 14:34:27 UTC

How to add message filter on broker server side

I create on destination on the broker server and register several consumers
and producers(use topic). Default , all the consumers will receive the
messages from producers(On client side , we can add message filter to do
some selection). But I think that we can add some filters on the server
side, then the broker will not dispatch so much messages to all consumer
(for example , A sends message to B , default C will also receives the
message , but if I add client_id = B in the message header or other places,
broker can read this from the message , then broker will just send this
message to B). What I think is correct ? How can I modify the source code to
meet the request or How to use current code to realize the need. Any help is
welcome. 
-- 
View this message in context: http://www.nabble.com/How-to-add-message-filter-on-broker-server-side-tf3907262s2354.html#a11077873
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: How to add message filter on broker server side

Posted by James Strachan <ja...@gmail.com>.
On 6/12/07, Jiang <zj...@163.com> wrote:
>
> I create on destination on the broker server and register several consumers
> and producers(use topic). Default , all the consumers will receive the
> messages from producers(On client side , we can add message filter to do
> some selection).

FWIW the broker implements selectors on the broker side

>  But I think that we can add some filters on the server
> side, then the broker will not dispatch so much messages to all consumer
> (for example , A sends message to B , default C will also receives the
> message , but if I add client_id = B in the message header or other places,
> broker can read this from the message , then broker will just send this
> message to B). What I think is correct ? How can I modify the source code to
> meet the request or How to use current code to realize the need. Any help is
> welcome.

Just use JMS selectors and the broker implements them on the server;
no messages are dispatched to topic consumers unless they match the
topic and selector

-- 
James
-------
http://macstrac.blogspot.com/