同步操作将从 WeBank/eventmesh 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Eventmesh-sdk-java , as the client, communicated with eventmesh-runtime, used to complete the sending and receiving of message.
Eventmesh-sdk-java supports async msg and broadcast msg. Async msg means the producer just sends msg and does not care reply msg.Broadcast msg means the producer send msg once and all the consumer subscribed the broadcast topic will receive the msg.
Eventmesh-sdk-java supports the protocol of HTTP and TCP.
TCP demos and Http demos are both under the eventmesh-test module.
prerequisite:after download the source code you should copy /conf/application.properties
and /conf/log4j2.xml
to
the resources
directory
create topic TEST-TOPIC-TCP-ASYNC on rocketmq-console
start consumer ,subscribe topic in previous step.
Run the main method of org.apache.eventmesh.tcp.demo.AsyncSubscribe
Run the main method of org.apache.eventmesh.tcp.demo.AsyncPublish
create topic TEST-TOPIC-TCP-BROADCAST on rocketmq-console
start consumer ,subscribe topic in previous step.
Run the main method of org.apache.eventmesh.tcp.demo.AsyncSubscribeBroadcast
Run the main method of org.apache.eventmesh.tcp.demo.AsyncPublishBroadcast
As to http, eventmesh-sdk-java implements the pub and sub for async event .
In the demo ,the field of
content
of the java classLiteMessage
represents a special protocal, so if you want to use http-client of eventmesh-sdk-java, you just need to design the content of protocal and supply the consumer appliacation at the same time.
producer send the event to consumer and don't need waiting response msg from consumer
create topic TEST-TOPIC-HTTP-ASYNC on rocketmq-console
start consumer, subscribe topic
Async consumer demo is a spring boot application demo, you can easily run this demo to start service and subscribe the topic.
Run the main method of org.apache.eventmesh.http.demo.sub.SpringBootDemoApplication
Run the main method of org.apache.eventmesh.http.demo.AsyncPublishInstance
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。