Open
Description
I'm using a ConsumerRebalanceListener to load state necessary for processing a partition when it is assigned. However, when ConsumerRebalanceListener.on_partitions_assigned() fails for some reason (i.e. the state isn't loaded), the error is logged and the consumer proceeds on as if nothing happened, happily consuming messages from the new partition. This will lead to data loss.
To avoid this, I am having to call sys.exit() if the ConsumerRebalanceListener encounters an error, which isn't exactly desirable. It would be better if the error was propagated up so I could deal with it normally. At the very least the assignment should fail so the consumer doesn't see any messages from the new partitions, and the rebalance can be reattempted.