822 B
822 B
RocketMQ + CloudEvents Sample
This example demonstrates the integration of RocketMQ 5.x client library with CloudEvents to create a RocketMQ binding.
Building the Project
mvn package
Setting Up a RocketMQ Instance
Follow the quickstart guide on the official RocketMQ website to set up the necessary components, including nameserver, proxy, and broker.
Event Production
mvn exec:java -Dexec.mainClass="io.cloudevents.examples.rocketmq.RocketmqProducer" -Dexec.args="foobar:8081 sample-topic"
Event Consumption
mvn exec:java -Dexec.mainClass="io.cloudevents.examples.rocketmq.RocketmqConsumer" -Dexec.args="foobar:8081 sample-topic sample-consumer-group"