Created
May 30, 2018 13:44
-
-
Save teivah/1fd2c8d0ee2d0a1833cd66fd39921421 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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