-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CAMEL-21216: Apache Camel LRA does not work with Oracle MicroTX LRA coordinator #15558
base: main
Are you sure you want to change the base?
Conversation
…ecoded. As long as 'CAMEL-21197' is not solved, this workaround is needed.
…se the generated url is part of the http put body.
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🤖 CI automation will test this PR automatically. 🐫 Apache Camel Committers, please review the following items:
|
It seems that when seding the LRA Join request, there is a wrong context-text header, maybe it need to change to camel/components/camel-lra/src/main/java/org/apache/camel/service/lra/LRAClient.java Lines 130 to 135 in 2e59dce
Can you share the Oracle LRA coordinator configurations? and I could use to reproduce this issue locally. |
Hmm, it looks like the payload is redundant since there is a link header. So can you try to use .PUT(HttpRequest.BodyPublishers.ofString("")) to see if it works with Oracle LRA coordinator? |
this is our current oracle lra-coordinator config .. have a nice weekend! |
Hi, when i am changing the the code to:
then i am still getting this error message from LRA-Coordinator:
The same error (still) occurs, if i change the header:
best regards |
@DFiedler sorry for the late reply since there are the public holidy on Mon and Tue in China. Well, how can I run the Oracle LRA coordinator on my local machine? is there any docker image? It would be very helpful if you can share a simple reproducer. I'd like to take a deep look. |
@zhfeng we are using OpenShift as the preferred runtime, u can also use Docker: https://docs.oracle.com/en/database/oracle/transaction-manager-for-microservices/24.2/tmmdg/supported-operating-systems.html because oracle also implements the Eclipse Microprofile LRA specification, it should work out of the box instead of Narayana (i guess u are using it for lra-coordinator) ... In our case this is the lra-coordinator base path (oracle microtx url): http://otmm-tcs.qa-servicebuilder-dev.svc.cluster.local:9000 |
Thanks @DFiedler - I can start a oracle coordinator locally and reproduce the issue. I'd like to discuss this issue with the Narayana team to see if there is any feedback. So let's hold the PR. |
} | ||
copy.query += key + "=" + value; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy.query += key + "=" + value; | |
copy.query += toNonnullString(key) + "=" + toNonnullString(value); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DFiedler please take a look this suggestion.
@@ -87,12 +88,18 @@ private void verifyRequest(Exchange exchange) { | |||
if (!queryParams.isEmpty()) { | |||
if (queryParams.get(URL_COMPENSATION_KEY) != null) { | |||
compensationURI = queryParams.get(URL_COMPENSATION_KEY).toString(); | |||
// CAMEL-21216: the call from the lra-coordinator is not correctly url-decoded | |||
// as long as 'CAMEL-21197' is not solved, this workaround is needed | |||
compensationURI = java.net.URLDecoder.decode(compensationURI, StandardCharsets.UTF_8); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Map<String, Object> queryParam = URISupport.parseQuery(exchange.getIn().getHeader(Exchange.HTTP_QUERY, String.class));
I'd like to use a different way to parse the query string from HTTP since as @davsclaus mentions that URISupport.parseQuery
is used for endpoints and have various optimized code. So it is NOT intend to as general purpose here.
Hi @DFiedler After meeting the narayana team, it looks like
|
Hi @zhfeng |
@zhfeng can you help get the last bits in place so this can be merged so it works with both oracle and narayana |
@davsclaus sure, I can. @DFiedler Do you mind I open a new PR to supersede this one? |
@zhfeng I want to ask, what is the next step here .. can i do anything to finalize this PR? |
|
Enable Oracle MicroTX lra-coordinator compatibility (https://issues.apache.org/jira/browse/CAMEL-21216).
The changes are backwards compatible to Narayana lra-coordinator.