chennaji9 opened a new issue, #11325:
URL: https://github.com/apache/rocketmq/issues/11325

   ### Description
   
   `docs/en/Example_OpenMessaging.md` still documents the old 0.1.0-alpha era 
API. The repository ships `io.openmessaging:openmessaging-api` **0.3.1-alpha** 
(`pom.xml:114`), and none of the page's snippets match it:
   
   - It builds the access point with 
`MessagingAccessPointFactory.getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace")`;
 the shipped driver API is 
`OMS.getMessagingAccessPoint("oms:rocketmq://host:9876/default:default")` (see 
`example/src/main/java/org/apache/rocketmq/example/openmessaging/SimpleProducer.java`).
   - Messages are created with `createBytesMessageToTopic(...)`; 0.3.1 uses 
`createBytesMessage(queue, body)`.
   - Async send uses `Promise`/`PromiseListener`; 0.3.1 returns 
`io.openmessaging.Future` with `addListener(future -> ...)`.
   - The pull consumer uses `consumer.poll()` and 
`message.headers().getString(MessageHeader.MESSAGE_ID)`; 0.3.1 uses 
`receive()`/`ack(msgId)` and 
`message.sysHeaders().getString(Message.BuiltinKeys.MESSAGE_ID)`.
   - Consumer config uses `NonStandardKeys.CONSUMER_GROUP`; 0.3.1 uses 
`OMSBuiltinKeys.CONSUMER_ID`.
   - The PushConsumer snippet never calls `consumer.startup()`, which is 
required before delivery begins.
   - The intro claims "OpenMessaging 0.1.0-alpha".
   
   Copying any snippet from this page produces code that does not compile 
against the OpenMessaging implementation the repository itself builds, and the 
page never mentions the required `OMS_RMQ_DIRECT_NAME_SRV=true` environment 
variable the examples depend on.
   
   ### Expected behavior
   
   The page should show the same working API as the bundled runnable examples 
(`example/.../openmessaging/SimpleProducer.java`, `SimplePullConsumer.java`, 
`SimplePushConsumer.java`) for the 0.3.1-alpha dependency, including the 
direct-nameserver environment variable and the push consumer's `startup()`.


-- 
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]

Reply via email to