File tree Expand file tree Collapse file tree 3 files changed +153
-251
lines changed Expand file tree Collapse file tree 3 files changed +153
-251
lines changed Original file line number Diff line number Diff line change 4646 "sideEffects" : false ,
4747 "dependencies" : {
4848 "aws4fetch" : " 1.0.20" ,
49+ "kafka-lz4-lite" : " ^1.0.5" ,
4950 "kafkajs" : " 2.2.4" ,
50- "kafkajs-lz4" : " 2.0.0-beta.0" ,
5151 "zod" : " 3.24.1"
5252 },
5353 "devDependencies" : {
Original file line number Diff line number Diff line change 11import { randomUUID } from "node:crypto" ;
22import { checkServerIdentity } from "node:tls" ;
3+ import { codec as lz4Codec } from "kafka-lz4-lite" ;
34import {
45 CompressionTypes ,
56 Kafka ,
67 type Producer ,
78 type ProducerConfig ,
89} from "kafkajs" ;
9- import LZ4Codec from "kafkajs-lz4" ;
1010import type { ServiceName } from "../core/services.js" ;
1111import { type UsageV2Event , getTopicName } from "../core/usageV2.js" ;
1212
@@ -91,7 +91,7 @@ export class UsageV2Producer {
9191 */
9292 async init ( configOverrides ?: ProducerConfig ) {
9393 if ( this . compression === CompressionTypes . LZ4 ) {
94- CompressionCodecs [ CompressionTypes . LZ4 ] = new LZ4Codec ( ) . codec ;
94+ CompressionCodecs [ CompressionTypes . LZ4 ] = lz4Codec ;
9595 }
9696
9797 this . producer = this . kafka . producer ( {
You can’t perform that action at this time.
0 commit comments