confluentinc / confluent-kafka-dotnet

Confluent's Apache Kafka .NET client
https://github.com/confluentinc/confluent-kafka-dotnet/wiki
Apache License 2.0
2.78k stars 847 forks source link

How to fill a list to PartitionAssignmentStrategy ? #2159

Open pitming opened 6 months ago

pitming commented 6 months ago

Description

the ConsumerConfig.PartitionAssignmentStrategy is documented to be able to receive an ordered list of strategies. "The name of one or more partition assignment strategies. The elected group leader // will use a strategy supported by all members of the group to assign partitions // to group members. If there is more than one eligible strategy, preference is // determined by the order of this list (strategies earlier in the list have higher // priority). Cooperative and non-cooperative (eager) strategies must not be mixed. // Available strategies: range, roundrobin, cooperative-sticky. default: range,roundrobin // importance: medium " But it is a single enum value. Is there a way to fill a list instead or should I make a PR to support it ?

How to reproduce

Just try to add a list to ConsumerConfig.PartitionAssignmentStrategy

Checklist

Please provide the following information:

ksdvishnukumar commented 4 months ago

Yes the property and description dies not match. But workaround for this is use the SetConfig method to pass the internal configuration property name and set the comma seperated value as string.

That should work..