Skip to content

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

Merged
merged 4 commits into from
Dec 10, 2018

Conversation

rnpridgeon
Copy link
Contributor

I accidentally trashed the original PR.

@rnpridgeon rnpridgeon requested a review from edenhill December 8, 2018 02:00
@rnpridgeon rnpridgeon force-pushed the consume_segfault branch 2 times, most recently from 93bb0d4 to 6a7da55 Compare December 8, 2018 02:54
Copy link
Contributor

@edenhill edenhill left a 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) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

@edenhill edenhill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy