jet / kafunk

Kafunk: F# Kafka client
https://jet.github.io/kafunk/
Other
160 stars 63 forks source link

Consumer shouldn't fail when no partitions are assigned. #186

Closed seaingsky closed 6 years ago

seaingsky commented 6 years ago

Details: currently in consumeGeneration method, in Consumer.fs we have: if assignment.Length = 0 then Log.error "no_partitions_assigned|conn_id=%s group_id=%s member_id=%s topic=%s" c.conn.Config.connId cfg.groupId state.state.memberId topic return failwithf "no partitions assigned!"

we should just log and let it pass.

eulerfx commented 6 years ago

The fix should be as simple as replacing:

return failwithf "no partitions assigned!"

with

return [||]