Skip to content

Instantly share code, notes, and snippets.

@carlogilmar
Last active July 27, 2017 16:22
Show Gist options
  • Save carlogilmar/cd95ccc0836f07e4df0b1853a8df0ba3 to your computer and use it in GitHub Desktop.
Save carlogilmar/cd95ccc0836f07e4df0b1853a8df0ba3 to your computer and use it in GitHub Desktop.
vertx.eventBus().consumer( "com.makingdevs.my.first.verticle" ){ message ->
String deploymentId = vertx.getOrCreateContext().deploymentID
println "This consumer has this deployment ID ${deploymentId})"
println "The message received by this verticle is ${message.body}"
}
vertx.eventBus().send("com.makingdevs.my.first.verticle", "== Hello Vertx! ==")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment