单机消息发布、订阅,代码整改,加掉了
This commit is contained in:
parent
028035dec5
commit
b8429e1d6a
@ -373,6 +373,7 @@ public class AppConfigHandler {
|
|||||||
|
|
||||||
initConnectionCircuitBreaker();
|
initConnectionCircuitBreaker();
|
||||||
createVertxRouter();
|
createVertxRouter();
|
||||||
|
consumerClusterEventMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Config hazelcastConfig(SacVertxConfig sacVertxConfig) {
|
private static Config hazelcastConfig(SacVertxConfig sacVertxConfig) {
|
||||||
@ -415,6 +416,15 @@ public class AppConfigHandler {
|
|||||||
log.info("hazelcastClusterManager create success");
|
log.info("hazelcastClusterManager create success");
|
||||||
initConnectionCircuitBreaker();
|
initConnectionCircuitBreaker();
|
||||||
createVertxRouter();
|
createVertxRouter();
|
||||||
|
consumerClusterEventMsg();
|
||||||
|
} else {
|
||||||
|
res.cause().printStackTrace();
|
||||||
|
log.info("hazelcastClusterManager create failure");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void consumerClusterEventMsg() {
|
||||||
// 订阅消息
|
// 订阅消息
|
||||||
VERTX.eventBus().consumer("sac_cluster_event", message -> {
|
VERTX.eventBus().consumer("sac_cluster_event", message -> {
|
||||||
if (message.body() != null) {
|
if (message.body() != null) {
|
||||||
@ -432,11 +442,6 @@ public class AppConfigHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
res.cause().printStackTrace();
|
|
||||||
log.info("hazelcastClusterManager create failure");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
Loading…
x
Reference in New Issue
Block a user