You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by madhavb <bh...@gmail.com> on 2012/09/20 14:00:30 UTC
Routing in ActiveMQ in distributed environment
I have a following scenario:
AMQ 'A', 'B' and 'C', is it possible for me to configure A such that
messages can be routed to B or C depending upon the message header? If so
how do I configure it in A?
Thanks in Advance,
Madhav.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Routing-in-ActiveMQ-in-distributed-environment-tp4656754.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Routing in ActiveMQ in distributed environment
Posted by Gaurav Sharma <ga...@gmail.com>.
So, are A, B, C brokers on three separate JVM's and looks like (from your description) that their producers are local on the same machine? By "instances", you do mean brokers, right?
With this 3 broker config, what use case are you trying to solve by routing message from A to B or C? Like you said, if P is local to A, it is wasteful for it to publish to B or C. Also, are your brokers geographically separated and remote from each other?
On Sep 21, 2012, at 0:12, madhavb <bh...@gmail.com> wrote:
> Gaurav,
>
> What I mean here is I have 3 instances of activeMQs at location A, B and C
> respectively, I have a producer bean 'P' in location A which locally places
> the messages in AMQ instance @A, locally because I relieve(lessen) the
> headache of connection maintenance and probability of message loss in 'P' if
> I were to connect to AMQ instances B or C remotely.
>
> regards,
> Madhav
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Routing-in-ActiveMQ-in-distributed-environment-tp4656754p4656790.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Routing in ActiveMQ in distributed environment
Posted by madhavb <bh...@gmail.com>.
Gaurav,
What I mean here is I have 3 instances of activeMQs at location A, B and C
respectively, I have a producer bean 'P' in location A which locally places
the messages in AMQ instance @A, locally because I relieve(lessen) the
headache of connection maintenance and probability of message loss in 'P' if
I were to connect to AMQ instances B or C remotely.
regards,
Madhav
--
View this message in context: http://activemq.2283324.n4.nabble.com/Routing-in-ActiveMQ-in-distributed-environment-tp4656754p4656790.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Routing in ActiveMQ in distributed environment
Posted by Gaurav Sharma <ga...@gmail.com>.
You can use the message group property or just roll your own k-v pair property and a selector on the consumer side.
Btw, what do you mean when you say "AMQ A, B, C"? The answer could be (in basic terms) any combination of broker, destination, producer or consumer.
On Sep 20, 2012, at 5:00, madhavb <bh...@gmail.com> wrote:
> I have a following scenario:
>
> AMQ 'A', 'B' and 'C', is it possible for me to configure A such that
> messages can be routed to B or C depending upon the message header? If so
> how do I configure it in A?
>
>
> Thanks in Advance,
> Madhav.
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Routing-in-ActiveMQ-in-distributed-environment-tp4656754.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: Routing in ActiveMQ in distributed environment
Posted by Bruce Snyder <br...@gmail.com>.
The easiest way to do sophisticated message routing between different broker instances is using Apache Camel. Check out the following URL for more info:
http://camel.apache.org/activemq.html
Camel offers some pretty advanced features that make such complex message routing pretty easy.
Bruce
--
perl -e 'print
unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'
ActiveMQ in Action: http://bit.ly/2je6cQ
Blog: http://bruceblog.org/
Twitter: http://twitter.com/brucesnyder
On Sep 20, 2012, at 6:00, madhavb <bh...@gmail.com> wrote:
> I have a following scenario:
>
> AMQ 'A', 'B' and 'C', is it possible for me to configure A such that
> messages can be routed to B or C depending upon the message header? If so
> how do I configure it in A?
>
>
> Thanks in Advance,
> Madhav.
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Routing-in-ActiveMQ-in-distributed-environment-tp4656754.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.