Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
Unknown
Description
I'd like to set an exception listener for all topics using "sjms2" but SjmsComponent is missing a setExceptionListener(...) method
https://github.com/apache/camel/blob/main/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java
You can see that the "jms" component has a setExceptionListener(...) method but I don't want spring-jms on my classpath
https://github.com/apache/camel/blob/main/components/camel-jms/src/main/java/org/apache/camel/component/jms/JmsComponent.java#L331-L333
As a workaround I have the choice to:
1. Set the exception listener in the URI of every jms inbound adapter
eg: "sjms2:some-topic?exceptionListener=#myExceptionListener"
2. Extend SjmsComponent2 to set the ExceptionListener on the Sjms2Component
ExceptionListener myExceptionListener = ex -> handleException(ex); Sjms2Component jmsComponent = new Sjms2Component() { protected SjmsEndpoint createSjmsEndpoint(String uri, String remaining) { SjmsEndpoint endpoint super.createSjmsEndpoint(uri, remaining); endpoint.setExceptionListener(exceptionListener); return endpoint; } }
I'd like to request that setExceptionListener(...) be added to SjmsComponent (which will be inherited by Sjms2Component)
Attachments
Issue Links
- links to