diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-07-17 12:00:00 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-07-17 12:00:23 -0700 |
commit | 77360a167fc5fab1c3204be2524a1f21d8dbef51 (patch) | |
tree | 34d79c04d91e0a9e648a677c0670dd5aa866e830 | |
parent | 0bda9a4734167bf88b3f1361928559d035df9392 (diff) | |
download | kafka-python-77360a167fc5fab1c3204be2524a1f21d8dbef51.tar.gz |
Expand consumer.fetcher comment re comparing request / response offsets
-rw-r--r-- | kafka/consumer/fetcher.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kafka/consumer/fetcher.py b/kafka/consumer/fetcher.py index f780fb2..66b6df0 100644 --- a/kafka/consumer/fetcher.py +++ b/kafka/consumer/fetcher.py @@ -683,7 +683,9 @@ class Fetcher(six.Iterator): self._subscriptions.assignment[tp].highwater = highwater # we are interested in this fetch only if the beginning - # offset matches the current consumed position + # offset (of the *request*) matches the current consumed position + # Note that the *response* may return a messageset that starts + # earlier (e.g., compressed messages) or later (e.g., compacted topic) fetch_offset = fetch_offsets[tp] position = self._subscriptions.assignment[tp].position if position is None or position != fetch_offset: |