activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stonebreaker <william.go...@gmail.com>
Subject Consumers connected to several brokers
Date Mon, 11 Sep 2017 13:01:13 GMT
Hi all,I have some concerns about the configuration of my spring application.
I have 2 brokers (one main and one failover) and I want my client to produce
messages to the first broker. It should go to the second one just in case
the first broker is down, and automatically go back to the first broker when
it's up again.My client also consumes these messages and I'd like *the
consumers to be constantly connected to both brokers* so that I can ensure
no message is left on a broker.*ActiveMQ 5.14.1* is used for the brokersMy
client is a Java web application using *spring 4.0.1.RELEASE, activemq-all
5.11.0* and running on tomcat 7. It must be able to process several messages
(~10) by second.For my producers, I use this JNDI resource to build the
connection factory:        And here are the Spring beans:									For the
consumers, I can't find the appropriate way to connect to both brokers so I
duplicated my configuration like below but it doesn't look right:I have 2
JNDI resources:        And here are the spring beans:																					
It doesn't make sense to duplicate these above consumers configurations so
could you please help me find the right way to implement my use case?Also,
if you have any other recommendation, I'd really appreciate.Thanks.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message