pandalee99 commented on code in PR #4462:
URL: https://github.com/apache/eventmesh/pull/4462#discussion_r1336123682
##########
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/demo/CClientDemo.java:
##########
@@ -45,13 +42,10 @@ public static void main(String[] args) throws Exception {
client.justSubscribe(ASYNC_TOPIC, SubscriptionMode.CLUSTERING,
SubscriptionType.ASYNC);
client.justSubscribe(BROADCAST_TOPIC, SubscriptionMode.BROADCASTING,
SubscriptionType.ASYNC);
client.listen();
- client.registerSubBusiHandler(new ReceiveMsgHook() {
- @Override
- public void handle(Package msg, ChannelHandlerContext ctx) {
- if (msg.getHeader().getCmd() ==
Command.ASYNC_MESSAGE_TO_CLIENT || msg.getHeader().getCmd() ==
Command.BROADCAST_MESSAGE_TO_CLIENT) {
- if (log.isInfoEnabled()) {
- log.info("receive message: {}", msg);
- }
+ client.registerSubBusiHandler((msg, ctx) -> {
+ if (msg.getHeader().getCmd() == Command.ASYNC_MESSAGE_TO_CLIENT ||
msg.getHeader().getCmd() == Command.BROADCAST_MESSAGE_TO_CLIENT) {
+ if (log.isInfoEnabled()) {
+ log.info("receive message: {}", msg);
Review Comment:
I see. Thanks for the guidance!
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]