EventMesh-sdk-java as the client,and comminucate with eventmesh-runtime,to finish the message sub and pub
EventMesh-sdk-java support both async and broadcast.
EventMesh-sdk-java support HTTP, TCP and gRPC.
The test demos of TCP, HTTP 和 GRPC are in the module eventmesh-examples
- Start consumer to subscribe the topic (we have created the TEST-TOPIC-TCP-ASYNC by default, you can also create other topic to test)
Run the main method of org.apache.eventmesh.tcp.demo.sub.eventmeshmessage.AsyncSubscribe
- Start producer to publish async message
Run the main method of org.apache.eventmesh.tcp.demo.pub.eventmeshmessage.AsyncPublish
- Start subscriber to subscribe the topic (we have created the TEST-TOPIC-TCP-BROADCAST by default, you can also create other topic to test)
Run the main method of org.apache.eventmesh.tcp.demo.sub.eventmeshmessage.AsyncSubscribeBroadcast
- Start publisher to publish async message
Run the main method of org.apache.eventmesh.tcp.demo.pub.eventmeshmessage.AsyncPublishBroadcast
More information about EventMesh-TCP, please refer to EventMesh TCP
- The subscriber is a SpringBoot demo, so run this demo to start subscriber (we have created the topic TEST-TOPIC-HTTP-ASYNC by default, you can also create other topic to test)
Run the main method of org.apache.eventmesh.http.demo.sub.SpringBootDemoApplication
- Start publisher to publish message
Run the main method of org.apache.eventmesh.http.demo.pub.eventmeshmessage.AsyncPublishInstance
More information about EventMesh-HTTP, please refer to EventMesh HTTP
- Start publisher to publish message (we have created the topic TEST-TOPIC-GRPC-ASYNC by default, you can also create other topic to test)
Run the main method of org.apache.eventmesh.grpc.pub.eventmeshmessage.AsyncPublishInstance
- Start webhook subscriber
Run the main method of org.apache.eventmesh.grpc.sub.app.SpringBootDemoApplication
- Start Request-Reply publisher to publish message (we have created the topic TEST-TOPIC-GRPC-RR by default, you can also create other topic to test)
Run the main method of org.apache.eventmesh.grpc.pub.eventmeshmessage.RequestReplyInstance
- Start stream subscriber
Run the main method of org.apache.eventmesh.grpc.sub.EventmeshAsyncSubscribe
- Start publisher to publish batch message (we have created the TEST-TOPIC-GRPC-ASYNC by default, you can also create other topic to test)
Run the main method of org.apache.eventmesh.grpc.pub.eventmeshmessage.BatchPublishInstance
More information about EventMesh-gRPC, please refer to EventMesh gRPC
Please refer to EventMesh Store and EventMesh Runtime to finish the necessary deployment before try our demo
After finishing the deployment of store and runtime, you can run our demos in module eventmesh-examples
:
cd bin
sh tcp_eventmeshmessage_sub.sh
cd bin
sh tcp_pub_eventmeshmessage.sh
cd bin
sh tcp_sub_eventmeshmessage_broadcast.sh
cd bin
sh tcp_pub_eventmeshmessage_broadcast.sh
cd bin
sh http_sub.sh
cd bin
sh http_pub_eventmeshmessage.sh
You can review the log in the folder /logs