@514labs/moose-lib 0.6.252-ci-3-gf88b2b20 → 0.6.252-ci-1-g40bb1da4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -26,7 +26,6 @@ __export(commons_exports, {
26
26
  antiCachePath: () => antiCachePath,
27
27
  cliLog: () => cliLog,
28
28
  compilerLog: () => compilerLog,
29
- createProducerConfig: () => createProducerConfig,
30
29
  getClickhouseClient: () => getClickhouseClient,
31
30
  getFileName: () => getFileName,
32
31
  getKafkaClient: () => getKafkaClient,
@@ -52,25 +51,18 @@ function isTruthy(value) {
52
51
  function mapTstoJs(filePath) {
53
52
  return filePath.replace(/\.ts$/, ".js").replace(/\.cts$/, ".cjs").replace(/\.mts$/, ".mjs");
54
53
  }
55
- function createProducerConfig(maxMessageBytes) {
56
- return {
54
+ async function getKafkaProducer(cfg, logger) {
55
+ const kafka = await getKafkaClient(cfg, logger);
56
+ const producer = kafka.producer({
57
57
  kafkaJS: {
58
- idempotent: false,
59
- // Not needed for at-least-once delivery
58
+ idempotent: true,
60
59
  acks: ACKs,
61
60
  retry: {
62
61
  retries: MAX_RETRIES_PRODUCER,
63
62
  maxRetryTime: MAX_RETRY_TIME_MS
64
63
  }
65
- },
66
- "linger.ms": 0,
67
- // Send immediately - batching happens at application level
68
- ...maxMessageBytes && { "message.max.bytes": maxMessageBytes }
69
- };
70
- }
71
- async function getKafkaProducer(cfg, logger, maxMessageBytes) {
72
- const kafka = await getKafkaClient(cfg, logger);
73
- const producer = kafka.producer(createProducerConfig(maxMessageBytes));
64
+ }
65
+ });
74
66
  await producer.connect();
75
67
  return producer;
76
68
  }
@@ -3305,7 +3297,6 @@ export {
3305
3297
  createClickhouseParameter,
3306
3298
  createConsumptionApi,
3307
3299
  createMaterializedView,
3308
- createProducerConfig,
3309
3300
  dropView,
3310
3301
  expressMiddleware,
3311
3302
  getApi,