-
Notifications
You must be signed in to change notification settings - Fork 38.5k
Client ID not set on connection when using Apache Camel with JtaTransactionManager (XA) #28102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I will try - not promise - to provide a test including embedded artemis broker (maybe difficult) and in-mem h2 database (easy) in the example project above. Makes it easier to re-produce as right now configuration is for standalone broker and server h2 database. |
Reproducer project has been updated to include an integration test (MainRouteIT). https://github.com/cquoss/camel-quarkus-xa-from-jms-to-db/tree/topic Test is still green since it is still WIP, but when looking into target/quarkus.log after running 'mvn verify' one sees the problem: 2022-02-25 12:14:16,506 [Camel (camel-1) thread #1 - JmsConsumer[foo]] [{camel.contextId=camel-1}] WARN org.apache.camel.component.jms.DefaultJmsMessageListenerContainer Setup of JMS message listener invoker failed for destination 'foo' - trying to recover. Cause: Cannot create durable subscription - client ID has not been set No external set up of artemis broker needed any more since this test makes use of quarkiverse artemis test resource. |
I've edited your comment to improve the formatting. You might want to check out this Mastering Markdown guide for future reference. |
Well. Thanks. Looks much better now. BTW, i finished on the reproducer project, see current commit: cquoss/camel-quarkus-xa-from-jms-to-db@042cb10 Only available integration test fails now because connection cannot be established. |
I am facing the same issue. I see that this is still open and in a triage state. Can someone take a look at this and update the status? |
@cquoss thanks for the reproducer but the only import on If you can reproduce this behavior with a Spring app, please update the reproducer and we can take another look. |
This was a Long Time ago.
From what i Recall from the reproducer the issue occurred in a Quarkus Environment using camel-jms.
So No Spring Context involved.
Regards
Clemens
|
Affects: v5.3.15 (detected there)
Complete setup involved Apache Camel in conjunction with Narayana Transaction Manager and RedHat Quarkus.
Example project is here:
https://github.com/cquoss/camel-quarkus-xa-from-jms-to-db/tree/topic
Look into the topic branch.
When trying to consume from this durable subscription error 'client id has not been set' is raised:
Problem lies before in establishing the (non-shared) connection:
Code of setting the client id on connection has to be moved to a
prepareConnection(...)
method as i provided here:https://github.com/cquoss/spring-framework/blob/c42b73cf4bf4147e2b6190f98d5efa8038816534/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java#L424
I left
prepareSharedConnection(...)
in place, but empty, for compatibility:https://github.com/cquoss/spring-framework/blob/c42b73cf4bf4147e2b6190f98d5efa8038816534/spring-jms/src/main/java/org/springframework/jms/listener/AbstractJmsListeningContainer.java#L459
Please suggest, comment or complain.
The text was updated successfully, but these errors were encountered: