We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm consuming messages from different topics and for each subgroup of topics I want to process the messages in a different way. Example:
const consumer = kafka.consumer({ groupId: 'my-group' }); await consumer.connect(); await consumer.subscribe({ topics: ['topic-A', 'topic-B', 'topic-C'] }); await consumer.run({ eachMessage: async ({ topic, partition, message, heartbeat, pause }) => { if (topic === 'topic-A') { myFuncA(message); } else { myFuncB(message); } } });
Is this the proper way to do it or should I create 2 different consuming groups: one for 'topic-A' and another one for 'topic-B' and 'topic-C' ?
The text was updated successfully, but these errors were encountered:
yes, this is proper way how to do this. If you create multiple consumer groups - it will create 3x connections and 3x more requests to Kafka.
Sorry, something went wrong.
No branches or pull requests
I'm consuming messages from different topics and for each subgroup of topics I want to process the messages in a different way.
Example:
Is this the proper way to do it or should I create 2 different consuming groups: one for 'topic-A' and another one for 'topic-B' and 'topic-C' ?
The text was updated successfully, but these errors were encountered: