Hi

You are welcome to create a JIRA and send a PR against main branch

On Wed, Jun 15, 2022 at 10:35 AM Lance Java
<lance.j...@googlemail.com.invalid> wrote:

> 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 = new Sjms2Endpoint(uri, this, remaining);
>       endpoint.setExceptionListener(exceptionListener);
>       return endpoint;
>    }
> }
>
> I'd like to request that setExceptionListener(...) be added
> to SjmsComponent (which will be inherited by Sjms2Component)
>
> Thanks,
> Lance.
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to