I understand that. The question was more around how you'd do what the work queue module does with Vert.x 3..
Dan
On Thursday, July 16, 2015 at 5:48:40 PM UTC+1, bytor99999 wrote:You can't use Vert.x 2.x modules with Vert.x 3. Vert.x 3 doesn't have modules anymore. ;) and no more deployModule() methods
Mark
On Thursday, July 16, 2015 at 6:50:11 AM UTC-7, Daniel Feist wrote:Hi,
Just wondering if the "work queue" module still applies to Vert.X 3.0, and just needs updating, or if Vert.X 3 takes a different approach to this..
thank!
Dan
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/7caf2fc0-8cae-47e1-9c42-b80de5b94314%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Vertx vertx = Vertx.vertx();
vertx.deployVerticle(new AbstractVerticle()
{
@Override
public void start() throws Exception
{
vertx.setPeriodic(50, event -> vertx.eventBus().send("foo", "HELLO"));
}
});
vertx.deployVerticle(new AbstractVerticle()
{
@Override
public void start() throws Exception
{
vertx.eventBus().consumer("foo", event -> {
try
{
System.out.println("IN " + Thread.currentThread().getName());
Thread.sleep(1000);
System.out.println("OUT " + Thread.currentThread().getName());
}
catch (InterruptedException e)
{
e.printStackTrace();
}
});
}
}, new DeploymentOptions().setWorker(true).setMultiThreaded(true));
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/ee648bcd-74e7-4d63-9637-132d966ec5b5%40googlegroups.com.
Hi Tim,
Not sure how to configure 20 instances..
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/b50cc409-2233-4e31-b2c1-eb1d3dc94524%40googlegroups.com.
I wouldn't recommend multi-threaded workers unless you have a very good reason for using them.
Have you tried standard worker and deploying 20 instances?