On 3/20/26 11:58, Justin Bertram wrote:
I would not expect this behavior, and I'm not sure how to handle it as
I don't understand the root cause of the problem.

Do you have a simple way to reproduce this (e.g., automated test you
can provide via GitHub, etc.)?


Justin

On Wed, Mar 18, 2026 at 5:02 AM Illia <[email protected]> wrote:

If the connection throws an exception even though failover is supposedly happening the pool must consider that connection failed and will close and remove it from the pooled set of connections. This can leave consumers in a state where they do not receive any new messages as the underlying connection is closed so if they have asynchronous message listeners assigned they would not be informed.  You could set an exception listener on the connection to get notified of an error and close all your connections currently active and take new ones from the pool.


Hi team. Please, help me with the following question.

This is my current configuration:


















* @Bean public ConnectionFactory activeMQConnectionFactory() { String
brokerUrl = "(tcp://somehost1.com:61617
<http://somehost1.com:61617>,tcp://somehost2.com:61617)?ha=true&sslEnabled=true";
final ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory(brokerUrl); connectionFactory.setUser("admin");
connectionFactory.setPassword("admin");
connectionFactory.setRetryInterval(1000);
connectionFactory.setReconnectAttempts(30); return connectionFactory; }
@Bean(destroyMethod = "stop") @Primary public ConnectionFactory
jmsPoolConnectionFactory(final ConnectionFactory activeMQConnectionFactory)
{ final JmsPoolConnectionFactory jmsPoolConnectionFactory = new
JmsPoolConnectionFactory();
jmsPoolConnectionFactory.setConnectionFactory(activeMQConnectionFactory);
jmsPoolConnectionFactory.setMaxConnections(10); return
jmsPoolConnectionFactory; }*

This are my dependencies:










*<dependency>  <groupId>org.apache.activemq</groupId>
<artifactId>artemis-jakarta-client</artifactId>  <version>2.43.0</version>
</dependency> <dependency>  <groupId>org.messaginghub</groupId>
<artifactId>pooled-jms</artifactId>  <version>3.1.7</version> </dependency>*

When I add JmsPoolConnectionFactory bean my active consumers stop receiving
messages on failover when an active node fails. Everything works fine
without JmsPoolConnectionFactory meaning that consumers continue receiving
messages on failover.
Is it expected? Is there a way to handle it?

Thanks! Best regards.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact



--
Tim Bish


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to