Claus Ibsen created CAMEL-26155:
-----------------------------------
Summary: camel-rocketmq - with waitForSendResult=false the
producer returns true and calls the callback later, and the header names are
spelled CamelRockerMQ
Key: CAMEL-26155
URL: https://issues.apache.org/jira/browse/CAMEL-26155
Project: Camel
Issue Type: Bug
Components: camel-rocketmq
Reporter: Claus Ibsen
Fix For: 4.24.0
Found while adding the catalog body types of rocketmq, hivemq, iggy and
kafka-share (CAMEL-24961, PR #28394).
h4. 1. waitForSendResult=false breaks the async callback contract
{{RocketMQProducer.processInOnly}} (main 2a465aa4814c, line 202) returns
{{!waitForSendResult}} (line 229), so with {{waitForSendResult=false}} it
returns true (done synchronously), but {{callback.done(true)}} is called later
from the RocketMQ {{SendCallback}} (lines 219 and 225), on the client thread. A
processor that returns true must have called the callback before it returns.
Read in the code, not run.
Proposed: with {{waitForSendResult=false}} call {{callback.done(true)}} right
after the send is started and only log the send result in the {{SendCallback}}.
h4. 2. The header names are spelled CamelRockerMQ
The header constants of {{RocketMQConstants}} (line 25 onwards:
{{CamelRockerMQTopic}}, {{CamelRockerMQTag}}, {{CamelRockerMQKey}},
{{CamelRockerMQOverrideTopicName}}...) say {{RockerMQ}} instead of
{{RocketMQ}}. These names are released, so users set them as they are. Read in
the code, not run.
Proposed: add the {{CamelRocketMQ*}} names, read both for a while, and note the
change in the upgrade guide.
h4. 3. The test-infra broker cannot be reached from a Docker Desktop host
{{RocketMQBrokerContainer}} (test-infra/camel-test-infra-rocketmq, line 30)
starts the broker without an advertised address, so the broker registers the
container IP with the name server. Tests running on a Docker Desktop host
(macOS) cannot connect to that IP. Checked on 4.24.0-SNAPSHOT with rocketmq
5.3.3 in Docker.
Proposed: set {{brokerIP1}} in the broker config to an address the host can
reach (with the mapped ports).
h4. 4. The tests are skipped on aarch64 though the image runs there
The {{camel-rocketmq}} {{pom.xml}} (line 40) sets {{skipTests.aarch64}} and
{{skipITs.aarch64}} with the comment that the container is only available on
x86, but the rocketmq 5.3.3 image runs on aarch64 (checked on 4.24.0-SNAPSHOT
on an arm64 Mac).
Proposed: remove the aarch64 skip.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)