Skip to content

Instantly share code, notes, and snippets.

@teivah
Created May 30, 2018 13:44
Show Gist options
  • Save teivah/1fd2c8d0ee2d0a1833cd66fd39921421 to your computer and use it in GitHub Desktop.
Save teivah/1fd2c8d0ee2d0a1833cd66fd39921421 to your computer and use it in GitHub Desktop.
vertx.deployVerticle("org.enterpriseintegration.Standard",
// Instantiate a DeploymentOptions by setting an explicit number
// of instances and referencing a JSON configuration
new DeploymentOptions().setInstances(instances).setConfig(config), res -> {
if (res.succeeded()) {
System.out.println("Standard verticle deployed");
// Send messages on the event bus
EventBus eventBus = vertx.eventBus();
eventBus.publish("event", "event01");
eventBus.send("event", "event02");
eventBus.send("event", "event03");
} else {
System.out.println("Error while deploying a verticle: " + res.cause().getMessage());
}
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment