0

我尝试用 Vertx 编写 Web API 来服务大用户。

@Override
public Router router(Vertx vertx) {
Router router = Router.router(vertx);
router.route().handler(BodyHandler.create());
router.post("/").handler(this::productionF);
return router;
}

private void productionF(RoutingContext routingContext) {
  // check input
  // read data from redis
  // response
}

但现在,我想将此 API 移动到异步进程以获得高性能。我尝试使用 EventBus,但它不起作用。

有没有人对此有任何想法或实验?

4

0 回答 0