Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Pluggable partition assignment strategies #218

Closed
wants to merge 2 commits into from
Closed

Commits on Mar 22, 2018

  1. Round-robin partition assignments across multiple topics

    This is closer to the behavior of Kafka's Java consumer, as described
    here:
    
    https://github.com/apache/kafka/blob/15bc405/clients/src/main/java/org/apache/kafka/clients/consumer/RoundRobinAssignor.java#L31-L55
    
    This is valuable in situations where you have highly disparate
    partition counts. Given three group members subscribed to many topics,
    only a few of which have more than one partition, the first member
    will receive far more assignments than the others.
    pd committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    685bf39 View commit details
    Browse the repository at this point in the history
  2. Pluggable partition assignment strategies

    This incorporates the round robin changes from bsm#216 (a64a8be) and
    exposes the ability for users to implement their own partition assignor.
    
    The tests for the two assignors now match the Java consumer's, to
    validate that the behaviors match up as expected. Reviewing the
    previous tests, I _think_ all of the same scenarios are still
    covered, as well.
    
    Backwards compatibility is maintained by falling back to the value in
    `PartitionStrategy` if the `PartitionAssignor` is unset.
    pd committed Mar 22, 2018
    Configuration menu
    Copy the full SHA
    3a860e6 View commit details
    Browse the repository at this point in the history