We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20a1321 commit dee754fCopy full SHA for dee754f
examples/kafkajs/consumer.js
@@ -6,6 +6,7 @@ async function consumerStart() {
6
const kafka = new Kafka({
7
brokers: ['pkc-8w6ry7.us-west-2.aws.devel.cpdev.cloud:9092'],
8
ssl: true,
9
+ connectionTimeout: 5000,
10
sasl: {
11
mechanism: 'plain',
12
},
@@ -15,7 +16,9 @@ async function consumerStart() {
15
16
17
onPartitionsRevoked: async (assignment) => {
18
console.log(`Revoked partitions ${JSON.stringify(assignment)}`);
- await consumer.commitOffsets();
19
+ await consumer.commitOffsets().catch((e) => {
20
+ console.error(`Failed to commit ${e}`);
21
+ })
22
}
23
24
rdKafka: {
0 commit comments