mirror of
https://gitee.com/BDWare/cm
synced 2025-01-10 09:54:03 +00:00
feat: add field status in return value of WSClientConsumer.publishEvent
This commit is contained in:
parent
82e7003083
commit
08f86a445f
@ -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()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user