Skip to content
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

Kafka producer throwing warnings on default configuration #73

Closed
stanczyk280 opened this issue Jul 2, 2024 · 1 comment · Fixed by #76
Closed

Kafka producer throwing warnings on default configuration #73

stanczyk280 opened this issue Jul 2, 2024 · 1 comment · Fixed by #76

Comments

@stanczyk280
Copy link

These 4 default configurations are injected when not specified by apply_kafka_default_config/1 routine from erlkaf_config.cc.

bool appy_kafka_default_config(rd_kafka_conf_t* config)
{
    if(rd_kafka_conf_set(config, "enable.auto.commit", "true", NULL, 0) != RD_KAFKA_CONF_OK)
        return false;

    if(rd_kafka_conf_set(config, "enable.auto.offset.store", "false", NULL, 0) != RD_KAFKA_CONF_OK)
        return false;

    if(rd_kafka_conf_set(config, "enable.partition.eof", "false", NULL, 0) != RD_KAFKA_CONF_OK)
        return false;

    if(rd_kafka_conf_set(config, "allow.auto.create.topics", "true", NULL, 0) != RD_KAFKA_CONF_OK)
        return false;
...

It produces warnings everytime it starts:

CONFWARN [thrd:app]: Configuration property enable.auto.commit is a consumer property and will be ignored by this producer instance
CONFWARN [thrd:app]: Configuration property enable.auto.offset.store is a consumer property and will be ignored by this producer instance
CONFWARN [thrd:app]: Configuration property enable.partition.eof is a consumer property and will be ignored by this producer instance
CONFWARN [thrd:app]: Configuration property allow.auto.create.topics is a consumer property and will be ignored by this producer instance

@silviucpp
Copy link
Owner

You are right. but this doesn't affect the functionality in any way. I need to change the code to put a flag if the the object is consumer or producer and to apply them only on producer. Any PR is welcome

gabriel-araujjo added a commit to gabriel-araujjo/erlkaf that referenced this issue Oct 8, 2024
Only apply "enable.auto.commit", "enable.auto.offset.store",
"enable.partition.eof" and "allow.auto.create.topics" configurations if
the target object is a consumer.

That change fixes silviucpp#73
silviucpp pushed a commit that referenced this issue Nov 5, 2024
Only apply "enable.auto.commit", "enable.auto.offset.store",
"enable.partition.eof" and "allow.auto.create.topics" configurations if
the target object is a consumer.

That change fixes #73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants