I'm trying to understand the simplest way of using a single fatjar for my production system, but still allowing verticles from that jar to be launched separately from the command line in addition to whatever was specified in the 'Main-Verticle' Maven config.
I.e. I'm ok with running the basic system with the following command which launches the verticle specified "Main-Verticle" which in my case then spawns a few other verticles:
java -jar target/my-fat-jar.jar -cluster -cluster-port 10000 -conf com.xx.my-conf.json
But, when the core system is running, I'd like to be able to launch/kill other verticles from within the same jar from the command line which might not have been launched at the initial startup, e.g. something like
java -jar target/my-fat-jar.jar com.xx.my-verticle -cluster -cluster-port 10000 -conf com.xx.my-service-conf.json
My challenge is the vertx/jar approach seems designed to be hardcoded with the name of a single 'main' verticle, and I do know I could implement my own dispatcher that accepts a config and launches any verticle in the jar, but I would seem to be rewriting vertx.io.Launcher at that point.
An example of another verticle I might want to run in addition to the main system is my application-specific 'Console' verticle, which itself takes a vertx json config file to tell it what to monitor. I can launch a 'service' configuration of this verticle fine using
vertx run "service:com.me.xx.console.cambridge" -cluster -cluster-port 10001
but on the PRODUCTION system I'd like to allow the same but from the fatjar if possible.
Hopefully this is fairly simple, any advice appreciated. I've been looking at things such as running "io.vertx.Launcher" from the fatjar and giving it the 'service' config of my verticle, but the "Main-Verticle" is still launched, not the one specified in the 'service format' json config file.