sarama
sarama copied to clipboard
We probably need an example of how to use the AlterPartitionReassignments function
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.
+1