0

Based on the documentation and some testing, I am seeing that Vert.x queues messages in round-robin manner for instances of a Vertical e.g. if I have 2 instances of "notification" worker vertical and 10 messages are incoming,

Instance #1 processes - message # 1,3,5,7,9

Instance #2 processes - message # 2,4,6,8,10

Even if Instance #1 completes processing of all it's messages faster (due to some decision flow), still it does not receive messages pending for Instance #2. It seems like the default queueing behavior.

Is there a way to change this to dynamic queuing instead of simple round-robin at message arrival?

AbhishekN
  • 368
  • 4
  • 8

1 Answers1

1

What you are looking for is a work-stealing pool, and I don't think Vert.x supports it for the moment.

From the top of my head, it may be because of the thread-safety guarantees Vert.x has, as in that all the handlers of a request should run on the same event loop.

Alexey Soshin
  • 16,718
  • 2
  • 31
  • 40