0

Asking this same question again Vertx event bus slow consuming issue


We have a non clustered vertx application, and we use the event bus to internally communicate between verticles.

  • Verticle A consumes from the bus, performs a HTTP request, and sends the response back through the bus.
  • Verticle B just request to perform that HTTP request.

The problem appears when a "high" request volume is performed by Verticle B. Then, the consumer starts receiving the events slower and slower (presumably because they are getting queued in the event bus). For 8 requests/second the bus takes up to 3-4 seconds to consume the event. When the requests/second are elevated, it can take more than 30 seconds to consume it, so the bus timeout is triggered.

The thing is, Verticle A is really fast performing the HTTP operation (~200ms) so I don't really understand why the requests get stuck in the bus.

We've tried many solutions but none ot then worked:

  • Deploy multiple instances of Verticle A as workers
  • Use vertx.executeBlocking() to perform the HTTP request

The only thing that worked was commenting the HTTP request and returning a mock object through the bus. But again, the HTTP request doesn't take more than 200ms, so it shouldn't be blocking the bus.

Aman Garg
  • 1
  • 1
  • Try to change EventBus on directly call Verticle B. You need to make sure that the problem is in EventBus implementation. – FranzF Oct 31 '22 at 07:48

0 Answers0