--
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/659762e1-9c46-4384-b012-b2d19e52d2ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/d6a941de-5e3a-4a56-88da-55c533d0a531%40googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/8cb211c6-ab7a-4f3c-931e-f5ed393c1a6a%40googlegroups.com.
DeliveryOptions deliveryOptions = new DeliveryOptions().setSendTimeout(120000);
vertx.eventBus().send("ejb.lookup",object,deliveryOptions, r -> {
if (r.succeeded()) { logger.info("[Main] Receiving reply ' " + r.result().body().toString()+ "' in " + Thread.currentThread().getName());
routingContext.response().end(r.result().body().toString()); }else{
logger.error("Response from event bus either failed or timed-out!"); routingContext.response().end("Error occurred while EJB Invocation!!!");}
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/decb1f60-73e5-4477-be14-266bdad76af9%40googlegroups.com.
I tried this scenario by setting the worker thread pool to 2 and sending 3 requests using jmeter and found that the worker thread is indeed held up so my 3rd request times out without even going to the executeBlocking code ! This might become a bottleneck in my scenario.If i use a worker vertical(to make EJB call) instead and set timeout duration on the message and the call takes longer than expected then my r.succeeded() will return false and i can handle that. But what will happen to the worker thread in this case ?
I’m not sure to understand the question about the worker thread. The worker thread is blocked until it does not block anymore and that does not depend on Vert.x.
I tried this scenario by setting the worker thread pool to 2 and sending 3 requests using jmeter and found that the worker thread is indeed held up so my 3rd request times out without even going to the executeBlocking code ! This might become a bottleneck in my scenario.If i use a worker vertical(to make EJB call) instead and set timeout duration on the message and the call takes longer than expected then my r.succeeded() will return false and i can handle that. But what will happen to the worker thread in this case ?
Also, I observed that when i send concurrent requests using jmeter, all the calls to code inside executeBlocking where getting processed sequentially and not parallel and using the same (worker) thread!
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/ab748792-bbd0-43db-888a-ffc8292167b0%40googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/d1038b82-fdef-4898-b430-e30f9710b48b%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/vertx.
To view this discussion on the web, visit https://groups.google.com/d/msgid/vertx/b3810dae-aa4f-4123-8a0a-ababa2fc0231%40googlegroups.com.