0

I am using vert.x version 4.5.13

I expect to use Vert.x's Launcher to start the verticle. When deploying the Verticle programmatically, I know that I can set the virtual thread as the underlying thread model through the ThreadingModel Option of DeploymentOptions, but how can I achieve this when running the Mainverticle through the Launcher?

Additionally, I would like to know which section of the documentation I should refer to for similar parameter configuration issues

I carefully read the runVeticle section of the documentation about starting Verticle using the command line, and it did not mention the naming correspondence between DeploymentOptions and command line parameter configuration, or perhaps I misunderstood from the beginning that the configuration in DeploymentOptions cannot be specified via the command line?

1 Answer 1

0

This is not supported with the Vert.x 4 Launcher.

As a workaround, you can create a custom (subclass of) Launcher and override io.vertx.core.Launcher#beforeDeployingVerticle:

@Override
public void beforeDeployingVerticle(DeploymentOptions deploymentOptions) {
  deploymentOptions.setThreadingModel(ThreadingModel.VIRTUAL_THREAD);
}

In Vert.x 5, there will be a -vt application launcher param that does that.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.