Skip to content

Commit 58c3449

Browse files
Update sr.js (#22)
* Update sr.js Noticed there wasn't a KafkaJS block so I added one. Please correct formatting if needed * Update sr.js
1 parent 6ba9e02 commit 58c3449

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

examples/kafkajs/sr.js

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,22 @@ const { SchemaRegistry, SchemaType } = require('@kafkajs/confluent-schema-regist
99

1010
const registry = new SchemaRegistry({ host: '<fill>' })
1111
const kafka = new Kafka({
12-
brokers: ['<fill>'],
13-
clientId: 'example-consumer',
14-
})
15-
let consumer = kafka.consumer({ groupId: 'test-group' , fromBeginning: true, } );
12+
kafkaJS: {
13+
brokers: ['<fill>'],
14+
ssl: true,
15+
sasl: {
16+
mechanism: 'plain',
17+
username: '<fill>',
18+
password: '<fill>',
19+
},
20+
}
21+
});
22+
let consumer = kafka.consumer({
23+
kafkaJS: {
24+
groupId: "test-group",
25+
fromBeginning: false,
26+
},
27+
});
1628
let producer = kafka.producer();
1729

1830
const schemaA = {

0 commit comments

Comments
 (0)