Akshay jadhav
Akshay jadhav

Reputation: 15

Rebalance happens due to long running consumer thread [#t1] - Will the same thread join the rebalance?

I want to know what happens to the current processing consumer thread when the rebalance occurs?

Consider three consumers threads are running and I have three partitions for a topic x.

Because we see in our application onRebalance all the threads t1, t2 and t3 are getting partition assigned again. Then how and where in code does the thread get killed?

Using

Upvotes: 0

Views: 356

Answers (1)

Gary Russell
Gary Russell

Reputation: 174504

The thread will not be killed (or interrupted, but socket reads are not interruptible anyway, you need to set a timeout).

When the thread finally returns (if it does), it will trigger another rebalance.

Upvotes: 2

Related Questions