You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by LiXiao2007 <Li...@gmail.com> on 2007/02/28 15:14:54 UTC

Re: [Spam: 5.0] How to set up Filters for Composite Queue

James, could you give me a little more detail? Do you mean that I need to use
BrokerService to get the broker info then add the filters. If I do that, I
have to do it either in the producer of the composite queue or the consumer
of the physical queue, right? 
Another question, when do you plan to release version 4.2? 
Thanks!


James.Strachan wrote:
> 
> On 2/28/07, LiXiao2007 <Li...@gmail.com> wrote:
>>
>>    I am using the latest Activemq 4.1 and would like to use a composite
>> queue
>> to forward the messages to several physical queues. From the activemq
>> documentation, we can set up filters on physical queues in the
>> configuraion
>> file so only needed messages will be delivered to them. But that
>> capability
>> is only for Activemq 4.2 and after and I don't think  it has been
>> released
>> yet.
> 
> There's a 4.2-SNAPSHOT release you can try now
> 
>> My question is how to set up the filtering in Java cod?
> 
> You can't in 4.1, you need 4.2.
> 
> By starting with the BrokerService you should be able to replicate the
> configuration of filtered composite queues described here in Java code
> http://activemq.apache.org/virtual-destinations.html
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-set-up-Filters-for-Composite-Queue-tf3308847s2354.html#a9204529
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: [Spam: 5.0] How to set up Filters for Composite Queue

Posted by James Strachan <ja...@gmail.com>.
On 2/28/07, LiXiao2007 <Li...@gmail.com> wrote:
>
> I did read the pages and configured the virtual destination. I tested and it
> worked. My problem is that I am using activemq 4.1 and we can't configure
> selector inside the activemq.xml.

So try using the 4.2-SNAPSHOT release which has the code to support
filters in it. 4.1 does not include that code.

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [Spam: 5.0] How to set up Filters for Composite Queue

Posted by LiXiao2007 <Li...@gmail.com>.
I did read the pages and configured the virtual destination. I tested and it
worked. My problem is that I am using activemq 4.1 and we can't configure
selector inside the activemq.xml. You said that I need to start with
BrokerService for the filtering and I should not code in the producer of the
composite queue or the consumer of the physical queue. Where should I make
the code change for filtering?


James.Strachan wrote:
> 
> On 2/28/07, LiXiao2007 <Li...@gmail.com> wrote:
>>
>> So I need to modify the code of broker and build my own version of
>> activemq?
> 
> Use the XML configuration file from the page I mentioned and it will
> configure virtual destinations to  your requirements - no need to
> modify broker code.
> 
> You might wanna read these pages first
> http://activemq.apache.org/getting-started.html
> http://activemq.apache.org/run-broker.html
> 
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-set-up-Filters-for-Composite-Queue-tf3308847s2354.html#a9206082
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: [Spam: 5.0] How to set up Filters for Composite Queue

Posted by James Strachan <ja...@gmail.com>.
On 2/28/07, LiXiao2007 <Li...@gmail.com> wrote:
>
> So I need to modify the code of broker and build my own version of activemq?

Use the XML configuration file from the page I mentioned and it will
configure virtual destinations to  your requirements - no need to
modify broker code.

You might wanna read these pages first
http://activemq.apache.org/getting-started.html
http://activemq.apache.org/run-broker.html

-- 

James
-------
http://radio.weblogs.com/0112098/

Re: [Spam: 5.0] How to set up Filters for Composite Queue

Posted by LiXiao2007 <Li...@gmail.com>.
So I need to modify the code of broker and build my own version of activemq? 


James.Strachan wrote:
> 
> On 2/28/07, LiXiao2007 <Li...@gmail.com> wrote:
>> James, could you give me a little more detail?
> 
> Maybe try starting with the XML exampe on the wiki before worrying
> about what the Java code looks like.
> 
> 
>>  Do you mean that I need to use
>> BrokerService to get the broker info then add the filters. If I do that,
>> I
>> have to do it either in the producer of the composite queue or the
>> consumer
>> of the physical queue, right?
> 
> Virtual Destinations only exist on the broker side, the JMS client
> (producer or consumer) is unaware of them
> 
> 
>> Another question, when do you plan to release version 4.2?
> 
> In a few weeks
> -- 
> 
> James
> -------
> http://radio.weblogs.com/0112098/
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-set-up-Filters-for-Composite-Queue-tf3308847s2354.html#a9204748
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: [Spam: 5.0] How to set up Filters for Composite Queue

Posted by James Strachan <ja...@gmail.com>.
On 2/28/07, LiXiao2007 <Li...@gmail.com> wrote:
> James, could you give me a little more detail?

Maybe try starting with the XML exampe on the wiki before worrying
about what the Java code looks like.


>  Do you mean that I need to use
> BrokerService to get the broker info then add the filters. If I do that, I
> have to do it either in the producer of the composite queue or the consumer
> of the physical queue, right?

Virtual Destinations only exist on the broker side, the JMS client
(producer or consumer) is unaware of them


> Another question, when do you plan to release version 4.2?

In a few weeks
-- 

James
-------
http://radio.weblogs.com/0112098/