pandaapo commented on code in PR #4617:
URL: https://github.com/apache/eventmesh/pull/4617#discussion_r1416467415
##########
eventmesh-runtime/src/test/java/org/apache/eventmesh/runtime/demo/BroadCastSubClient.java:
##########
@@ -40,15 +40,11 @@ public static void main(String[] args) throws Exception {
client.init();
client.heartbeat();
client.justSubscribe(ClientConstants.BROADCAST_TOPIC,
SubscriptionMode.BROADCASTING, SubscriptionType.ASYNC);
- client.registerBusiHandler(new ReceiveMsgHook() {
-
- @Override
- public void handle(Package msg, ChannelHandlerContext ctx) {
- if (msg.getHeader().getCommand() ==
Command.BROADCAST_MESSAGE_TO_CLIENT) {
- if (msg.getBody() instanceof EventMeshMessage) {
- String body = ((EventMeshMessage)
msg.getBody()).getBody();
- LogUtils.info(log, "receive message
-------------------------------{}", body);
- }
+ client.registerBusiHandler((msg, ctx) -> {
+ if (msg.getHeader().getCommand() ==
Command.BROADCAST_MESSAGE_TO_CLIENT) {
+ if (msg.getBody() instanceof EventMeshMessage) {
+ String body = ((EventMeshMessage)
msg.getBody()).getBody();
+ LogUtils.info(log, "receive message
-------------------------------{}", body);
Review Comment:
My suggestion is to refer to the description in the issue: change "
-------------------------------" to ": ".
--
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]