-
Notifications
You must be signed in to change notification settings - Fork 1.4k
A simpler kafka consumer #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
fa6738b
A simpler kafka consumer:
82b3e01
Handle FailedPayloadsError on client.send_fetch_request; permit offse…
b264d8f
add private methods _set_consumer_timeout_start() and _check_consumer…
5376351
Use configure() to check and set configuration keys
4c111d3
Use client.get_partition_ids_for_topic
62a7189
Add set_topic_partitions method to configure topics/partitions to con…
e702880
self._topics is private; fixup topic iterations for new TopicAndParti…
80dfaeb
Move kafka._msg_iter initialization from __init__() to next()
93dd705
_client is private var
d5ec0a6
Support setting offsets in set_topic_partitions(); reorganize offsets…
67aa1a1
_should_auto_commit is private
8dc3623
raise KafkaConfigurationError in commit() if there is no configured '…
9dd7d7e
Add docstring to configure()
26e18ce
Add docstring to get_partition_offsets; use request_time_ms and max_n…
54ecfea
Add a few basic KafkaConsumer tests
5b88298
Use 4-space indents
08f6ad9
Reorder methods, add docstrings to public methds, section comments fo…
7caf9be
Add private methods to manage internal _msg_iter
07ff623
Move auto-commit checks to task_done; add support for auto_commit_int…
742af4f
Raise KafkaConfigurationError during fetch_messages if not topics/par…
391b532
Update docstrings w/ current interface / config defaults
6e6ae53
Use six for py3 support in KafkaConsumer
6b44828
Move KafkaConsumer to kafka.consumer.kafka module; make available for…
206560a
Force absolue_imports in kafka/consumer/kafka.py
b80e83b
Fix task_done checks when no previous commit exists; add test
9e1b203
Merge conflict w/ assertEqual (assertEquals deprecated)
1a06f79
Make TIMEOUT_MS configurable in test_kafka_consumer__blocking
08df93b
Add private methods _does_auto_commit_ms and _does_auto_commit_messages
209a8f2
OffsetCommit metadata must be bytes
ed893c3
Use kafka.util.kafka_bytestring to encode utf-8 when necessary
d27d49f
Fixup call to self._client.get_partition_ids_for_topic -- use encoded…
e3fd29c
Simplify BYTES_CONFIGURATION_KEYS logic, per wizzat review
29cae3e
Add some jitter to refresh_leader_backoff_ms, per wizzat review
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
from .simple import SimpleConsumer | ||
from .multiprocess import MultiProcessConsumer | ||
from .kafka import KafkaConsumer | ||
|
||
__all__ = [ | ||
'SimpleConsumer', 'MultiProcessConsumer' | ||
'SimpleConsumer', 'MultiProcessConsumer', 'KafkaConsumer' | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much yes to this. SO MUCH YES.