Hi,

If you are using the official Java clients:

(1) Partition assignments are performed on the client side. You could check
the interface named ConsumerPartitionAssignor or PartitionAssignor (
deprecated in 2.4 ) for customized partition assignments.
(2) You could implement the ConsumerPartitionAssignor interface and pass
whatever vars you want
(3) You could manually assign to your consumers. Check the
KafkaConsumer#assign(Collection) on the Consumer interface; This method
doesn't use the consumer's group managements

On Mon, 12 Oct 2020 at 23:30, Mazen Ezzeddine <mazen.ezzedd...@gmail.com>
wrote:

> When a new Kafka consumer joins/leaves a consumer group, Kafka runtime
> triggers a rebalancing process so that a new assignment/mapping of
> partitions to the new set of consumers is performed. I kindly have three
> questions on the rebalancing process:
>
> (1) Is it possible to plug in somehow a custom rebalancing algorithm,
> other than the ones already implemented?
>
> (2) Is it possible to pass an external variable to the custom algorithm?
>
> (3) Is it possible to dynamically and selectively launch a rebalancing
> process, other than the known cases (such as when consumer leaves, join
> etc..)
>

Reply via email to