Skip to content

SimpleMessageListenerContainer - add possibility to disable manual recovery #22987

@maciejmiklas

Description

@maciejmiklas

The method SimpleMessageListenerContainer#onException(JMSException) starts recovery process. In my opinion it should be configurable, because many JMS Providers can recover automatically, for example ActiveMQ.

This gest even more interesting - in our case we have observed dropped connections to JMS Listeners. After some debugging I've discovered, that ActiveMQ will throw JMS Exception in like 99% cases, but sometimes it's just not comming. The SimpleMessageListenerContainer starts recovery, closes connection pool and relies of fact, that each not successful reconnection attempt will throw JMSException, but sometimes it does not.

So far we are using such workaround:

public static class ActiveMqMessageListenerContainer extends SimpleMessageListenerContainer {

   @Override
   public void onException(JMSException ex) {
   }
}

But I would prefer a possibility to disable manual Failover in SimpleMessageListenerContainer

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions