Skip to content

Commit 7cc6c75

Browse files
committed
confluentinc kafka-javascript
Signed-off-by: Joe Bowbeer <[email protected]>
1 parent 4d40593 commit 7cc6c75

File tree

7 files changed

+279
-56
lines changed

7 files changed

+279
-56
lines changed

package-lock.json

Lines changed: 219 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/modules/kafka/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"build": "tsc --project tsconfig.build.json"
3030
},
3131
"devDependencies": {
32-
"kafkajs": "^2.2.4"
32+
"@confluentinc/kafka-javascript": "^1.7.0"
3333
},
3434
"dependencies": {
3535
"compare-versions": "^6.1.1",

packages/modules/kafka/src/kafka-container-7.test.ts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,19 @@ describe("KafkaContainer", { timeout: 240_000 }, () => {
8484
})
8585
.start();
8686

87-
await assertMessageProducedAndConsumed(container, {
88-
brokers: [`${container.getHost()}:${container.getMappedPort(9096)}`],
89-
sasl: {
90-
username: "app-user",
91-
password: "userPassword",
92-
mechanism: "scram-sha-512",
93-
},
94-
ssl: {
95-
ca: [fs.readFileSync(path.resolve(certificatesDir, "kafka.client.truststore.pem"))],
87+
await assertMessageProducedAndConsumed(
88+
container,
89+
{
90+
brokers: [`${container.getHost()}:${container.getMappedPort(9096)}`],
91+
ssl: true,
9692
},
97-
});
93+
{
94+
"sasl.username": "app-user",
95+
"sasl.password": "userPassword",
96+
"sasl.mechanism": "scram-sha-512",
97+
"ssl.ca.location": path.resolve(certificatesDir, "kafka.client.truststore.pem"),
98+
}
99+
);
98100
// }
99101
});
100102

@@ -121,17 +123,19 @@ describe("KafkaContainer", { timeout: 240_000 }, () => {
121123
})
122124
.start();
123125

124-
await assertMessageProducedAndConsumed(container, {
125-
brokers: [`${container.getHost()}:${container.getMappedPort(9096)}`],
126-
sasl: {
127-
username: "app-user",
128-
password: "userPassword",
129-
mechanism: "scram-sha-512",
130-
},
131-
ssl: {
132-
ca: [fs.readFileSync(path.resolve(certificatesDir, "kafka.client.truststore.pem"))],
126+
await assertMessageProducedAndConsumed(
127+
container,
128+
{
129+
brokers: [`${container.getHost()}:${container.getMappedPort(9096)}`],
130+
ssl: true,
133131
},
134-
});
132+
{
133+
"sasl.username": "app-user",
134+
"sasl.password": "userPassword",
135+
"sasl.mechanism": "scram-sha-512",
136+
"ssl.ca.location": path.resolve(certificatesDir, "kafka.client.truststore.pem"),
137+
}
138+
);
135139
});
136140

137141
it(`should connect within Docker network`, async () => {

0 commit comments

Comments
 (0)