When appRebalanceEnable == true and rebalanceCb == nil and channel == nil
, we want handle the event by poll
, so the rebalance event should return by poll
but not nil.
link:
|
if channel != nil && c.appRebalanceEnable && c.rebalanceCb == nil { |
fix example:
if c.appRebalanceEnable && c.rebalanceCb == nil {
// Channel-based consumer with rebalancing enabled,
// return the rebalance event and rely on the application
// to call *Assign() / *Unassign().
return ev
}