0
votes

When only one consumer is present in a group and consider that consumer could not poll within session.time.out then a rebalance will be triggered, but in this scenario we are having only one consumer in the group , Now lets say session.time.out is 30 sec and consumer polls after 50 sec will group co-ordinator will recognise the consumer after 50 sec and allow it to commit the offset or the co-ordinator will disconnect the consumer and no offset gets committed and will rebalance the consumer with new consumer id ? If last committed offset was 345678 and in next poll it has processed messaged till 345900 but took 50 seconds(session.time.out is 30) then once the rebalance is triggered will it read from 345678 or from 345900 or will it start from auto.offset.reset:latest offset

1

1 Answers

1
votes

The number of consumers doesn't change how the coordinators recognizes them. If a consumer doesn't poll within a session.timeout.ms it means that it has already exceeded heartbeat.interval.ms so a re-balance will be triggered and when the consumer polls again after 50 sec it will be treated as a new consumer and assigned a new consumer id.