chennaji9 opened a new issue, #11312:
URL: https://github.com/apache/rocketmq/issues/11312
### Description
`docs/en/Operations_Trace.md` shows trace-enabling client constructors with
two arguments:
- Section 4.1 (line 59): `DefaultMQProducer producer = new
DefaultMQProducer("ProducerGroupName",true);`
- Section 4.2 (line 79): `DefaultMQPushConsumer consumer = new
DefaultMQPushConsumer("CID_JODIE_1",true);`
Neither a `(String, boolean)` `DefaultMQProducer` constructor nor a
`(String, boolean)` `DefaultMQPushConsumer` constructor exists in the current
client:
-
`client/src/main/java/org/apache/rocketmq/client/producer/DefaultMQProducer.java:280`:
`public DefaultMQProducer(final String producerGroup, boolean enableMsgTrace,
final String customizedTraceTopic)`
-
`client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java:336`:
`public DefaultMQPushConsumer(final String consumerGroup, boolean
enableMsgTrace, final String customizedTraceTopic)`
Copying the 4.1/4.2 snippets as-is fails to compile (`The constructor
DefaultMQProducer(String, boolean) is undefined`), so readers cannot run the
primary "enable message trace" examples on this page. Section 4.3 of the same
page already uses the correct three-argument form with a custom trace topic.
### Expected behavior
The snippets should compile against the shipped client API: pass `null` as
`customizedTraceTopic` (the documented meaning of `null` is "use the default
system trace topic"), consistent with section 4.3 of the same page, e.g. `new
DefaultMQProducer("ProducerGroupName", true, null)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]