Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In KIP-266, Kafka deprecated `poll(long)` with `poll(Duration)` as former method applies no timeout on assignment metadata update. New method applies timeout value to do both "update assignment metadata" as well as "poll some records", which doesn't cover the case where caller is only interested in assignment metadata. `poll(0)` has been used as some kind of hack for such purpose (though Kafka document clarifies the behavior is not guaranteed), and there's no alternative - poll`poll(Duration.ZERO)` would bring timeout on updating assignment metadata.

...