mirror of
https://gitee.com/BDWare/cm
synced 2026-01-28 20:09:26 +00:00
feat: add field status in return value of WSClientConsumer.publishEvent
This commit is contained in:
@@ -173,7 +173,8 @@ public class EventBroker {
|
||||
topic2cIds.get(topic).add(cId);
|
||||
switch (consumer.getType()) {
|
||||
case Contract:
|
||||
LOGGER.info("contract " + ((ContractConsumer) consumer).getContract() + " subscribes topic " + topic);
|
||||
LOGGER.info("contract " + ((ContractConsumer) consumer).getContract() +
|
||||
" subscribes topic " + topic);
|
||||
break;
|
||||
case Node:
|
||||
LOGGER.info("node " + consumer.getId() + " subscribes topic " + topic);
|
||||
|
||||
@@ -41,6 +41,7 @@ public class WSClientConsumer implements IEventConsumer {
|
||||
}
|
||||
JsonObject ret = new JsonObject();
|
||||
ret.addProperty("action", "onEvent");
|
||||
ret.addProperty("status", "Success");
|
||||
ret.add("data", JsonUtil.parseString(msg));
|
||||
channel.writeAndFlush(new TextWebSocketFrame(ret.toString()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user