资源说明:vertx-service-proxy 是 EventBus 代理生成。示例:// Assume database service is already deployed somewhere....
// Save some data in the database
JsonObject message = new JsonObject();
message.putString("collection", "mycollection");
message.putObject("document", new JsonObject().putString("name", "tim"));
DeliveryOptions options = new DeliveryOptions().addHeader("action", "save");
vertx.eventBus().send("database-service-address", message, options, res2 -> {
if (res2.succeeded()) {
// done
}
}
标签:vertx
本源码包内暂不包含可直接显示的源代码文件,请下载源码包。