This repository was archived by the owner on Mar 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
Producer futures #269
Merged
Merged
Producer futures #269
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
862e86e
producer: use protocol.Messages on queues etc
yungchin c6bb40e
producer: return futures from produce()
yungchin 1613635
travis-ci: add missing dependency
yungchin f626b91
Merge remote-tracking branch 'parsely/master' into feature/producer-f…
yungchin 4c4e128
producer: fix pending futures for required_acks=0
yungchin aff59c3
producer: small refactor after parent commit
yungchin bd5a15c
producer: add test and fix bug in future exceptions
yungchin a63797c
update README re producer futures
yungchin b932fb1
producer: doc improvements
yungchin 1a680f6
producer: remove unused imports
yungchin 9c62a1f
Merge remote-tracking branch 'parsely/master' into feature/producer-f…
yungchin b868316
Merge branch 'master' into feature/producer-futures
emmettbutler 6b4b1ce
protocol: define Message.__slots__
yungchin 92d1291
tests: test producer with recoverable error
yungchin 330a0fe
protocol: add delivery_future to Message.__init__
yungchin a1d9c3b
tests: fix test that was added with 92d12916
yungchin f4f6df1
producer: add kafka_msg to returned futures
yungchin 7aa90e6
README: update producer examples
yungchin 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
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
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.
Since you're using
Message.delivery_future
in the producer, I think it should be mentioned here and declared in__init__
withNone
as its initial value. Since we're going to be keeping a lot ofMessage
instances in memory now, we may want to consider adding__slots__
to this class.__slots__
would serve a dual purpose: explicitly documenting all of the attributes aMessage
can ever have, and reducing the memory footprint of each message instance.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.
Thanks, yes, that should make a really nice improvement. I'd never had a good use for
__slots__
before and had all but forgotten about them. Shall I just do that within this pull request? (I guess this is touching so many bits already, I might as well?)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.
Yes, I recommended it here because I think the change is small and pertinent enough to be included in this PR.
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.
Cool, will do that. Thanks!