Vertx - Launcher extension (Custom launcher)


The launcher has several lifecycle methods that you can override in order to add custom code that provide a way to configure the options:

  • for the creation of a vertx
  • or for the deployment of a verticle


If we want to set some metrics, we could extends the launcher and override the method beforeStartingVertx

public class Launcher extends io.vertx.core.Launcher {

  public void beforeStartingVertx(VertxOptions options) {



  public static void main(String[] args) {

    new Launcher().dispatch(args);




In a IDE such as IDEA, you can then create a Run configuration with the launcher as a main class.

Documentation / Reference

Powered by ComboStrap