You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by DanielR <ro...@gmail.com> on 2009/03/17 10:01:26 UTC
Change Message Destination using Interceptors
How can I change the destination queue of a message using Interceptors?
--
View this message in context: http://www.nabble.com/Change-Message-Destination-using-Interceptors-tp22554890p22554890.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Change Message Destination using Interceptors
Posted by James Strachan <ja...@gmail.com>.
2009/3/17 DanielR <ro...@gmail.com>:
>
> I can't get it working... any examples would be nice please
Here's a bunch of examples...
http://camel.apache.org/examples.html
The spring XQuery example might be a good start...
http://camel.apache.org/spring-xquery-example.html
you might find its easier to write your predicate using Java
http://camel.apache.org/bean-language.html
rather than one of the available expression languages...
http://camel.apache.org/languages.html
See the example route on the bean language page
http://camel.apache.org/bean-language.html
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/
Re: Change Message Destination using Interceptors
Posted by DanielR <ro...@gmail.com>.
I can't get it working... any examples would be nice please
James.Strachan wrote:
>
> 2009/3/17 DanielR <ro...@gmail.com>:
>>
>> I have 2 restrictions:
>>
>> 1. The routing must be done server side
>> 2. The routing depends on the body, not on the header or some property
>
> Both of those are fine - just include the content based router inside
> the broker process. ActiveMQ can easily host Camel routes by just
> including the route definition in the activemq.xml.
>
> Have a look at the <camelContext> in the activemq.xml in the binary
> distro of ActiveMQ to see an example route.
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>
>
--
View this message in context: http://www.nabble.com/Change-Message-Destination-using-Interceptors-tp22554890p22567634.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Change Message Destination using Interceptors
Posted by James Strachan <ja...@gmail.com>.
2009/3/17 DanielR <ro...@gmail.com>:
>
> I have 2 restrictions:
>
> 1. The routing must be done server side
> 2. The routing depends on the body, not on the header or some property
Both of those are fine - just include the content based router inside
the broker process. ActiveMQ can easily host Camel routes by just
including the route definition in the activemq.xml.
Have a look at the <camelContext> in the activemq.xml in the binary
distro of ActiveMQ to see an example route.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/
Re: Change Message Destination using Interceptors
Posted by DanielR <ro...@gmail.com>.
I have 2 restrictions:
1. The routing must be done server side
2. The routing depends on the body, not on the header or some property
James.Strachan wrote:
>
> 2009/3/17 DanielR <ro...@gmail.com>:
>>
>>
>> I need to forward the messsage to the proper queue depending on the first
>> 10
>> characters of the body of the message.
>
> Sounds like a content based router...
> http://camel.apache.org/content-based-router.html
>
> its probably better to do that using Camel rather than as an
> interceptor on the broker
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>
>
--
View this message in context: http://www.nabble.com/Change-Message-Destination-using-Interceptors-tp22554890p22560854.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Change Message Destination using Interceptors
Posted by James Strachan <ja...@gmail.com>.
2009/3/17 DanielR <ro...@gmail.com>:
>
>
> I need to forward the messsage to the proper queue depending on the first 10
> characters of the body of the message.
Sounds like a content based router...
http://camel.apache.org/content-based-router.html
its probably better to do that using Camel rather than as an
interceptor on the broker
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/
Re: Change Message Destination using Interceptors
Posted by DanielR <ro...@gmail.com>.
I need to forward the messsage to the proper queue depending on the first 10
characters of the body of the message.
James.Strachan wrote:
>
> 2009/3/17 DanielR <ro...@gmail.com>:
>>
>> How can I change the destination queue of a message using Interceptors?
>
> Whats your use case BTW?
>
> The easiest thing might be to use a CamelDestination which can then
> use a route client side to perform content based routing etc.
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>
>
--
View this message in context: http://www.nabble.com/Change-Message-Destination-using-Interceptors-tp22554890p22559812.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Change Message Destination using Interceptors
Posted by James Strachan <ja...@gmail.com>.
2009/3/17 DanielR <ro...@gmail.com>:
>
> How can I change the destination queue of a message using Interceptors?
Whats your use case BTW?
The easiest thing might be to use a CamelDestination which can then
use a route client side to perform content based routing etc.
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/