Skip to content

Instantly share code, notes, and snippets.

@league55
Created October 16, 2019 14:29
Show Gist options
  • Save league55/7f2f2b46d6d2a0896b7b31d023b97140 to your computer and use it in GitHub Desktop.
Save league55/7f2f2b46d6d2a0896b7b31d023b97140 to your computer and use it in GitHub Desktop.
private void registerEventListener(String id) {
EventBus eventBus = vertx.eventBus();
logger.info("Registering new event handler " + id);
eventBus.consumer(id, message -> {
logger.info(String.valueOf(message.body()));
this.getInfo(String.valueOf(message.body()))
.setHandler(s -> {
message.reply(s.result());
s.succeeded();
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment