Skip illegal properties instead of failing bridging of full message#6541
Skip illegal properties instead of failing bridging of full message#6541davidvoit wants to merge 1 commit into
Conversation
|
I can create a jira issue for this one, but first want to check if this is something you want to handle. |
|
You're mentioning qpid mesasge. Are you sending it originally as AMQP?
A test would elucidate this I think. |
|
We two way bridge between our old JMS vendor and artemis. We use the addMessageIdHeader option and a selector to avoid endless loops. Core protocol is used to support XATransactions between both "worlds". After the migration our applications mostly using AMQP |
|
I can provide the original error only on monday - sorry |
|
"Why are you using the JMS Bridge? You could use the broker connection bridge. (JMS Bridge will convert messages as Core, While the AMQP Bridge will keep the message as is (it will even keep core messages as core)." To make this more clear, this error is triggered on the artemis -> other jms vendor path of the bridge. To add the original messageid as a new property all properties are cleared in the code block and readded. Here we trigger this bug. The property is in the Core protocol message and on the readding it's not allowed. |
|
I see.. a test would be great.. perhaps a mock test to describe exactly the issue. |
|
Sure, will work on something on monday. Will also create a jira issue then. Thanks for the support on these issues btw :-) |
|
Exception: |
|
This would be a standalone unit test of the bug without the JMSBridge: |
28f79f5 to
e138da9
Compare
|
Added a unit test which does a full JMSBridge run. Also added a run which would trigger the bug |
e138da9 to
2e4ca65
Compare
|
Sorry forget this unusual 3 char indention - not used to checkstyle files, but did run it manuelly and it's now passing: Sorry about that |
|
Ok that is something new to me. Question here should the checks be also running under the jakarta side of things or is it enough if they are only run on the jms side? I will add now the test dependencies, but I don't know if I should add the surefire stuff? |
2e4ca65 to
0cae0d1
Compare
If for example a java qpid client is sending a message, and the bridge is using a core protocol receiver the "x-opt-jms-msg-type" can't be copied and would trigger a invalidJavaIdentifier exception. As it seems these properties are only special properties, it's better to just skip these properties and just log the error. We only trace log the error as every qpid message triggers this error.
0cae0d1 to
f8cd41d
Compare
|
For what it's worth, you can run the Checkstyle checks using the See more in the hacking guide. |
|
mvn test did now work for both jms aswell for the jakarta subprojects. On my intellij system dependencies are little bit finicky as there is some dependency loop. Will run now the mvn -Pdev install run without ide stuff. But I think it should be fine now Update: |
|
Should I create jira issue for this? |
If for example a java qpid client is sending a message, and the bridge is using a core protocol receiver the "x-opt-jms-msg-type" can't be copied and would trigger a invalidJavaIdentifier exception.
As it seems these properties are only special properties, it's better to just skip these properties and just log the error. We only trace log the error as every qpid message triggers this error.