Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Dec 25, 2024
1 parent 2c2c071 commit 8126704
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugin-server/functional_tests/kafka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import SnappyCodec from 'kafkajs-snappy'
import { HighLevelProducer } from 'node-rdkafka'

import { defaultConfig } from '../src/config/config'
import { produce as defaultProduce } from '../src/kafka/producer'
import { KafkaProducerWrapper } from '../src/kafka/producer'

CompressionCodecs[CompressionTypes.Snappy] = SnappyCodec

Expand Down Expand Up @@ -48,5 +48,6 @@ export async function produce({
waitForAck: boolean
}) {
producer = producer ?? (await createKafkaProducer())
await defaultProduce({ producer, topic, value: message, key: Buffer.from(key), waitForAck })

await new KafkaProducerWrapper(producer).produce({ topic, value: message, key: Buffer.from(key), waitForAck })
}

0 comments on commit 8126704

Please sign in to comment.