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

JS client configuration broken? #140

Open
unfrgivn opened this issue Mar 7, 2020 · 0 comments
Open

JS client configuration broken? #140

unfrgivn opened this issue Mar 7, 2020 · 0 comments

Comments

@unfrgivn
Copy link

unfrgivn commented Mar 7, 2020

I see this library uses node-sinek which allows for running native or JS consumer/producers, but I don't see any way to force this library to use the new JS client? Both the native and JS clients use the same config with the noptions key in the newer versions of node-sinek and you only differentiate by loading different modules from the package. When I try to run kafka-streams though I get Error: You have to install node-rdkafka to use NConsumer. Looks like you are only able to use the older node-sinek JS client set with the options key?

Based on the KafkaFactory.js

if (this.config.noptions && typeof this.config.noptions === "object") {
    debug("creating new native kafka client");
    return new NativeKafkaClient(topic, this.config, this.batchOptions);
}
.
.
.
debug("creating new js kafka client");
return new JSKafkaClient(topic, this.config);

This seems incorrect based on the fact that the node-sinek JSConsumer/Producer also use config.noptions now https://github.com/nodefluent/node-sinek/blob/master/lib/kafkajs/JSConsumer.js

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

No branches or pull requests

1 participant