-
Notifications
You must be signed in to change notification settings - Fork 919
Make group.id required for consumer instantiation(#472) #506
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
Conversation
93bb0d4
to
6a7da55
Compare
6a7da55
to
91186ad
Compare
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.
LGTM!
@@ -1629,6 +1629,18 @@ rd_kafka_conf_t *common_conf_setup (rd_kafka_type_t ktype, | |||
PyDict_Update(confdict, kwargs); | |||
} | |||
|
|||
if (ktype == RD_KAFKA_CONSUMER) { | |||
ko = cfl_PyUnistr(_FromString("group.id")); | |||
if (PyDict_Contains(confdict, ko) != 1) { |
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.
Using PyDict_GetItemString()
avoids the extra object ko object creation.
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.
good point, I see now it returns a borrowed reference; stand-by I'll fix that I just though _Contains
felt more propper.
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.
lgtm
I accidentally trashed the original PR.