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

How to get the committed offset on the consumer side #985

Closed
patrickckfcdc opened this issue Nov 30, 2022 · 0 comments
Closed

How to get the committed offset on the consumer side #985

patrickckfcdc opened this issue Nov 30, 2022 · 0 comments

Comments

@patrickckfcdc
Copy link

I am evaluating node-rdkafka library on some use cases.

I use the "committed" function to try to get the committed offset, but no matter how long I configure in the timeout there is no response from the callback.

Global Config

{
"group.id": "test_group",
"client.id": "test_group",
"socket.keepalive.enable": true,
"partition.assignment.strategy": "roundrobin",
"group.instance.id": "test_group_0",
"enable.auto.commit": false,
"metadata.broker.list": "127.0.0.1:9094,
}

Consumer Topic Config

{
"auto.offset.reset": "beginning",
"consume.callback.max.messages": 10000,
}
consumer.commit([{topic, partition}], 5000, (err, offsets) => {
 if (err) {
 // err handle
 } else {
 // handle the committed offsets
 }
});

Is there anything missing in the configuration? please suggest. Thanks in advance.

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