[ 
https://issues.apache.org/jira/browse/CAMEL-21705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923462#comment-17923462
 ] 

Claus Ibsen commented on CAMEL-21705:
-------------------------------------

Well how would that be possible as camel needs to listen for message and 
therefore need to set the message listener. 

spring is a battle tested library and are used heavily in the world - it has a 
roboust and great JMS support for growing and shrinking on demand.

 

> support quarkus-artemis-ra with sjms2
> -------------------------------------
>
>                 Key: CAMEL-21705
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21705
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-sjms2
>            Reporter: Vincent Sevel
>            Priority: Minor
>
> this proposes to support quarkus-artemis-ra as a mean to connect to artemis 
> servers using sjms or sjms2 in quarkus infused camel applications.
> some context:
> on our quarkus applications we have settled on quarkus-artemis-ra to access 
> artemis servers, for the following reasons: managed listener, automatic 
> rebalancing connections, native support for pooling
> I have tried this extension with sjms end sjms2 in a camel route, but failed 
> to do so because of forbidden methods setExceptionListener and 
> setMessageListener
>  
> {{Caused by: jakarta.jms.IllegalStateException: This method is not applicable 
> inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6}}
> {{        at 
> org.apache.activemq.artemis.ra.ActiveMQRASessionFactoryImpl.setExceptionListener(ActiveMQRASessionFactoryImpl.java:534)}}
> {{        at 
> org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer.createConnection(SimpleMessageListenerContainer.java:307)}}
> {{        at 
> org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer.doStart(SimpleMessageListenerContainer.java:228)}}
> {{        at 
> org.apache.camel.support.service.BaseService.start(BaseService.java:123)}}
> {{        ... 35 more}}
> and
>  
> {{Caused by: jakarta.jms.IllegalStateException: This method is not applicable 
> inside the application server. See the J2EE spec, e.g. J2EE1.4 Section 6.6}}
> {{        at 
> org.apache.activemq.artemis.ra.ActiveMQRASession.checkStrict(ActiveMQRASession.java:1311)}}
> {{        at 
> org.apache.activemq.artemis.ra.ActiveMQRAMessageConsumer.setMessageListener(ActiveMQRAMessageConsumer.java:118)}}
> {{        at 
> org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer.configureConsumer(SimpleMessageListenerContainer.java:127)}}
> {{        at 
> org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer.initConsumers(SimpleMessageListenerContainer.java:258)}}
> {{        at 
> org.apache.camel.component.sjms.consumer.SimpleMessageListenerContainer.doStart(SimpleMessageListenerContainer.java:229)}}
> {{        at 
> org.apache.camel.support.service.BaseService.start(BaseService.java:123)}}
> it is interesting to note that the ra can be used ith sjms/sjms2 in a camel 
> route if only publishing. but it is not possible to consume from jms.
>  
> it would be nice to have some alignment between quarkus and camel with 
> respect to accessing artemis servers through the RA.
> however the artemis ra can be used with the original jms connector, which has 
> the following drawbacks: it drags some spring libraries in the quarkus app, 
> sjms and sjms2 are said to have perf improvements compared to the jms 
> connector.
> if using sjms and sjms2 it is possible to use the other extension 
> quarkus-artemis-jms, but it requires to add quarkus-pooled-jms to allow 
> connection pooling, but the main drawback is that quarkus applications that 
> want to use classic jms with the ra, plus a camel route, would have to use 2 
> sets of extensions to access artemis. fron a maintenance standpoint it is 
> better if we can settle on 1 single extension. i.e. quarkus-artemis-ra
>  
> some other issues have been fixed, which could have been avoided if a sjms 
> implementation support directly the ra:
>  * CACHE_NONE: [https://github.com/apache/camel-quarkus/pull/6906]
>  * serilization issue on getReference(): 
> [https://github.com/quarkiverse/quarkus-ironjacamar/pull/155] 
> quarkus-artemis-ra is a sophisticated and feature proof approach to allow 
> dealing with artemis servers. it would be nice to allow using it natively in 
> camel routes inside quarkus applications.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to