I want to run multiple, non-clustered verticles on my webserver. Each verticle is started by a separate process/commandline and creates his own HTTP server (vertx.createHttpServer) for the same host and the same port with unique routes. However, this does not seem to work because after starting one verticle, all further verticles throw a BindException "Address already in use".
As a Vert.x novice I can only think of two ways to get passed this:
- Programmatically deploy all verticles from a single process, and make all verticles use a global router instance for adding their specific routes.
- Cluster the verticles and create an additional verticle that provides a webserver which allows to setup routes and handle requests and response via the clustered eventbus.
Both approaches would force me to rewrite large parts of my verticles.
Is there another way to circumvent this multiserver issue?