-
Notifications
You must be signed in to change notification settings - Fork 224
Adding partitions to a topic during runtime does not trigger a rebalance #235
Comments
@toefel18 I remember this has been raised in the past, but I am not sure if this is actually a bug. To me it would make more sense if the server triggered a rebalance when partitions are added. The only way for a client to identify new partitions is to constantly ping the brokers and track metadata changes. I assume this is what the java client must be doing, but even that will not really solve your problem, as added partitions will not be identified immediately. New partitions will only be registered with the client at the next metadata refresh call. At that point new messages may have already been added to those partitions and - as long as you configure |
@dim I'm not sure how the kakfa protocol works underneath, so it could be that the java client uses polling, I should look at the timestamps in our log-files for that. Your suggestion of However, I don't want to have to manually restart my Go services because somebody decided to add a I'm not sure what the behavior of https://github.com/edenhill/librdkafka is, but that client has an official Go wrapper by confluent, maybe we should check the behavior of that client to see what is considered expected |
@toefel18 thanks for the clarification, I will take this into account for the upcoming V3 - #234. In fact, I should probably add it to the low-level consumer IBM/sarama#1083 |
@dim do you know if this ended up getting patched in IBM/sarama#1099? |
@ShaneSaww no, it didn't, but the idea was to keep the
|
I was toying with the idea of handler "middlewares" too and this could be just one of them |
@dim That's awesome! I was starting down the path of doing this setup. |
I tested in the latest version and enable the sarama logger, found that when added a new partition, the producer will send to the latest partition, but consumer was not refreshed. |
Situation:
my-test-topic
my-test-topic
during runtime (for now assume that message-order does not matter)The official Java client library does trigger a rebalance, it appears to be a bug
The text was updated successfully, but these errors were encountered: