chennaji9 opened a new pull request, #11342:
URL: https://github.com/apache/rocketmq/pull/11342

   <!-- Please make sure the target branch is right. In most case, the target 
branch should be `develop`. -->
   
   ### Which Issue(s) This PR Fixes
   
   Fixes #11325
   
   ### Brief Description
   
   Rewrites the three snippets in `docs/en/Example_OpenMessaging.md` to the API 
of the OpenMessaging implementation this repository actually ships 
(`io.openmessaging:openmessaging-api` 0.3.1-alpha, `pom.xml:114`), mirroring 
the runnable examples in `example/.../openmessaging/`:
   
   - 
`OMS.getMessagingAccessPoint("oms:rocketmq://localhost:9876/default:default")` 
instead of `MessagingAccessPointFactory` + the old `openmessaging:` URL scheme;
   - `createBytesMessage` instead of `createBytesMessageToTopic`;
   - `Future` + listener instead of `Promise`/`PromiseListener`;
   - pull consumer: `receive()`/`ack`/`sysHeaders`/`Message.BuiltinKeys` 
instead of `poll()`/`headers()`/`MessageHeader`; `OMSBuiltinKeys.CONSUMER_ID` 
instead of `NonStandardKeys.CONSUMER_GROUP`;
   - the push consumer snippet now calls `consumer.startup()`, which was 
missing entirely;
   - the intro no longer claims 0.1.0-alpha and documents the 
`OMS_RMQ_DIRECT_NAME_SRV=true` prerequisite the examples require.
   
   ### How Did You Test This Change?
   
   Each rewritten snippet was extracted, prepended with the import block of its 
corresponding runnable example, and compiled against the built module jars: 
`javac -cp openmessaging/target/classes:openmessaging-api-0.3.1-alpha.jar` → 
success for all three (SimpleProducer, SimplePullConsumer, SimplePushConsumer). 
The snippets otherwise match 
`example/src/main/java/org/apache/rocketmq/example/openmessaging/*` at the PR 
base commit, where they compile as part of the example module.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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