sarama icon indicating copy to clipboard operation
sarama copied to clipboard

We probably need an example of how to use the AlterPartitionReassignments function

Open VinGarcia opened this issue 1 year ago • 1 comments

Description

Right now I needed to change the replication factor of an existing topic, and I found this issue here that discusses this:

https://github.com/IBM/sarama/issues/1238

This issue culminated on a PR that added the function:

But the API is not intuitive since the request object has an AddBlock function that expects as argument a replicas []int32, and I was (naively) expecting a function that would receive just the number of desired replicas and update the topic accordingly.

So what I really need right now is to know how to use this function for changing the number of replicas and in particular what exactly to pass as the replicas slice; but we could take this opportunity to also add an example to either the examples/ directory or the GoDoc. I could write a PR for that if necessary.

VinGarcia avatar Nov 28 '23 13:11 VinGarcia

+1

sanathkumarbs avatar Jan 30 '24 00:01 sanathkumarbs