Reputation: 4289
I'm trying to follow instructions on official vert.x site related to starting/stopping vertx verticle gracefully by passing jvm arg
You can also start an application in background using:
java -jar my-verticle-fat.jar start -Dvertx-id=my-app-name
If my-app-name is not set, a random id will be generated, and printed on the command prompt.
You can pass run options to the start command:
java -jar my-verticle-fat.jar start -Dvertx-id=my-app-name -cluster
However, I can't get it to stop using -Dvertx-id=my-app-name
now that I started the application with below command:
java -jar my-verticle-fat.jar stop my-app-name
It only stops with the random ID it generated and not this ID I defined in JVM arg. Anyone know how this is done to stop process gracefully without killing it?
Upvotes: 1
Views: 963
Reputation: 3222
Use:
java -jar my-verticle-fat.jar start --vertx-id=my-app-name -cluster
Then, to stop it:
java -jar my-verticle-fat.jar stop my-app-name
Upvotes: 1