confluent-kafka-dotnet icon indicating copy to clipboard operation
confluent-kafka-dotnet copied to clipboard

How to fill a list to PartitionAssignmentStrategy ?

Open pitming opened this issue 1 year ago • 1 comments

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:

  • [x] A complete (i.e. we can run it), minimal program demonstrating the problem. No need to supply a project file: Not relevant here
  • [x] Confluent.Kafka nuget version: Confluent.Kafka 2.3.0
  • [x] Apache Kafka version: 3.4.0
  • [x] Client configuration: not relevant
  • [x] Operating system: Linux
  • [x] Provide logs (with "debug" : "..." as necessary in configuration).: Not relevant
  • [x] Provide broker log excerpts.: Not Relevant
  • [x] Critical issue.: I guess it could when migrating a group from another strategy to a newer one (like sticky)

pitming avatar Dec 20 '23 09:12 pitming

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..

ksdvishnukumar avatar Feb 22 '24 18:02 ksdvishnukumar