chennaji9 opened a new issue, #11329:
URL: https://github.com/apache/rocketmq/issues/11329
### Description
The namespace example
`example/src/main/java/org/apache/rocketmq/example/namespace/ProducerWithNamespace.java`
reports every completed send as a success:
```java
SendResult result = producer.send(message);
System.out.printf("Topic:%s send success, misId is:%s%n",
message.getTopic(), result.getMsgId());
```
`DefaultMQProducer.send` can return normally with a non-`SEND_OK` status —
`FLUSH_DISK_TIMEOUT`, `FLUSH_SLAVE_TIMEOUT`, `SLAVE_NOT_AVAILABLE` — exactly
the cases where persistence or replication did not meet the requested
guarantee. The example then prints "send success", hiding the degraded status
from whoever is learning from the sample. (The example also misspells `msgId`
as `misId`.)
### Expected behavior
The output should carry the actual `SendResult` status (e.g. print
`result.getSendStatus()`), so a non-`SEND_OK` result is visible instead of
being labeled "success".
--
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]