prasannajoshi
prasannajoshi

Reputation: 157

Vertx multithreaded verticle instance and worker pool size

for my vertx app, I am creating and deploying multithreaded verticle having multiple instance , i just want to know if number of instance and worker pool size for that verticle should be same?? Different? With reference if possible , thanks in advance

Upvotes: 0

Views: 2069

Answers (1)

tsegismont
tsegismont

Reputation: 9138

The only purpose of multithreaded worker verticles is to register eventbus consumers and handle messages on worker threads concurrently without having to create as much instances as threads available in the worker pool.

So the answer to your question is: create a single instance, it will use all the worker threads available.

But if you plan something else, don't do it. For example, you can't create HTTP servers on a MT worker verticle.

More importantly, if you're starting a new application, avoid multithreaded worker verticles, they are deprecated and will be completely removed in Vert.x 4.

Upvotes: 1

Related Questions