kafka-crab-js 5.0.0 → 5.1.0

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.
Files changed (49) hide show
  1. package/README.md +47 -52
  2. package/dist/{base-kafka-stream-readable-CtlWvan5.d.ts → base-kafka-stream-readable-DhcM_Cxe.d.cts} +1 -3
  3. package/dist/{base-kafka-stream-readable-CtlWvan5.d.cts → base-kafka-stream-readable-DhcM_Cxe.d.ts} +1 -3
  4. package/dist/{channels-CCvEbkFg.d.ts → channels-B58YR3qB.d.ts} +1 -3
  5. package/dist/{channels-D4ZtiwQz.d.cts → channels-w3H3WXjh.d.cts} +1 -3
  6. package/dist/diagnostics/channels.cjs +1 -2
  7. package/dist/diagnostics/channels.d.cts +1 -1
  8. package/dist/diagnostics/channels.d.ts +1 -1
  9. package/dist/diagnostics/channels.js +1 -2
  10. package/dist/diagnostics/index.d.cts +2 -2
  11. package/dist/diagnostics/index.d.ts +2 -2
  12. package/dist/diagnostics/instrumentation.cjs +1 -2
  13. package/dist/diagnostics/instrumentation.d.cts +1 -1
  14. package/dist/diagnostics/instrumentation.d.ts +1 -1
  15. package/dist/diagnostics/instrumentation.js +1 -2
  16. package/dist/index.cjs +7 -1
  17. package/dist/index.d.cts +8 -8
  18. package/dist/index.d.ts +8 -8
  19. package/dist/index.js +3 -3
  20. package/dist/{instrumentation-Cd62Qkxq.d.ts → instrumentation-BfAIYxQY.d.cts} +1 -3
  21. package/dist/{instrumentation-Cd62Qkxq.d.cts → instrumentation-BfAIYxQY.d.ts} +1 -3
  22. package/dist/kafka-client.cjs +5 -2
  23. package/dist/kafka-client.cjs.map +1 -1
  24. package/dist/kafka-client.d.cts +4 -4
  25. package/dist/kafka-client.d.ts +4 -4
  26. package/dist/kafka-client.js +5 -2
  27. package/dist/kafka-client.js.map +1 -1
  28. package/dist/{send-failure-DMmbzTJn.d.ts → send-failure-CliKeTof.d.cts} +1 -3
  29. package/dist/{send-failure-DMmbzTJn.d.cts → send-failure-CliKeTof.d.ts} +1 -3
  30. package/dist/send-failure.cjs +1 -2
  31. package/dist/send-failure.d.cts +1 -1
  32. package/dist/send-failure.d.ts +1 -1
  33. package/dist/send-failure.js +1 -2
  34. package/dist/streams/base-kafka-stream-readable.cjs +1 -2
  35. package/dist/streams/base-kafka-stream-readable.d.cts +1 -1
  36. package/dist/streams/base-kafka-stream-readable.d.ts +1 -1
  37. package/dist/streams/base-kafka-stream-readable.js +1 -2
  38. package/dist/streams/kafka-batch-stream-readable.cjs +1 -2
  39. package/dist/streams/kafka-batch-stream-readable.d.cts +1 -3
  40. package/dist/streams/kafka-batch-stream-readable.d.ts +1 -3
  41. package/dist/streams/kafka-batch-stream-readable.js +1 -2
  42. package/dist/streams/kafka-stream-readable.cjs +1 -2
  43. package/dist/streams/kafka-stream-readable.d.cts +2 -3
  44. package/dist/streams/kafka-stream-readable.d.ts +2 -3
  45. package/dist/streams/kafka-stream-readable.js +1 -2
  46. package/js-binding.cjs +192 -55
  47. package/js-binding.d.ts +122 -0
  48. package/js-binding.js +130 -56
  49. package/package.json +7 -7
package/README.md CHANGED
@@ -54,7 +54,7 @@ do not need a separate Rust toolchain or librdkafka installation. ESM, CommonJS,
54
54
  and TypeScript declarations are included.
55
55
 
56
56
  ```js
57
- import { KafkaClient } from "kafka-crab-js";
57
+ import { KafkaClient } from 'kafka-crab-js'
58
58
  // CommonJS: const { KafkaClient } = require('kafka-crab-js')
59
59
  ```
60
60
 
@@ -85,35 +85,33 @@ Use `KAFKA_BROKERS` for a comma-separated broker list; the examples default to
85
85
  `producer.mjs`:
86
86
 
87
87
  ```js
88
- import { KafkaClient } from "kafka-crab-js";
88
+ import { KafkaClient } from 'kafka-crab-js'
89
89
 
90
90
  const client = new KafkaClient({
91
- brokers: process.env.KAFKA_BROKERS ?? "localhost:9092",
92
- clientId: "orders-producer",
93
- });
91
+ brokers: process.env.KAFKA_BROKERS ?? 'localhost:9092',
92
+ clientId: 'orders-producer',
93
+ })
94
94
 
95
95
  const producer = client.createProducer({
96
96
  configuration: {
97
- "enable.idempotence": true,
98
- acks: "all",
99
- "compression.type": "lz4",
97
+ 'enable.idempotence': true,
98
+ acks: 'all',
99
+ 'compression.type': 'lz4',
100
100
  },
101
- });
101
+ })
102
102
 
103
103
  const deliveries = await producer.send({
104
- topic: "orders",
104
+ topic: 'orders',
105
105
  messages: [
106
106
  {
107
- key: Buffer.from("order-42"),
108
- payload: Buffer.from(
109
- JSON.stringify({ orderId: "order-42", total: 129.9 }),
110
- ),
111
- headers: { "content-type": Buffer.from("application/json") },
107
+ key: Buffer.from('order-42'),
108
+ payload: Buffer.from(JSON.stringify({ orderId: 'order-42', total: 129.9 })),
109
+ headers: { 'content-type': Buffer.from('application/json') },
112
110
  },
113
111
  ],
114
- });
112
+ })
115
113
 
116
- console.log("Delivered:", deliveries);
114
+ console.log('Delivered:', deliveries)
117
115
  ```
118
116
 
119
117
  By default, `send()` waits for delivery results and rejects on failure. For
@@ -127,65 +125,62 @@ See [producer delivery semantics](docs/api.md#delivery-and-partial-failures).
127
125
  `consumer.mjs`:
128
126
 
129
127
  ```js
130
- import { KafkaClient } from "kafka-crab-js";
128
+ import { KafkaClient } from 'kafka-crab-js'
131
129
 
132
130
  const client = new KafkaClient({
133
- brokers: process.env.KAFKA_BROKERS ?? "localhost:9092",
134
- clientId: "orders-consumer",
135
- });
131
+ brokers: process.env.KAFKA_BROKERS ?? 'localhost:9092',
132
+ clientId: 'orders-consumer',
133
+ })
136
134
 
137
135
  const { consumer, stream } = client.createWebStreamConsumer({
138
- groupId: "orders-workers",
136
+ groupId: 'orders-workers',
139
137
  enableAutoCommit: false,
140
138
  batchSize: 64,
141
139
  batchTimeout: 5,
142
140
  configuration: {
143
- "enable.auto.offset.store": false,
144
- "auto.offset.reset": "earliest",
141
+ 'enable.auto.offset.store': false,
142
+ 'auto.offset.reset': 'earliest',
145
143
  },
146
- });
144
+ })
147
145
 
148
- const reader = stream.getReader();
146
+ const reader = stream.getReader()
149
147
  const stop = () => {
150
- void reader.cancel("shutdown").catch(console.error);
151
- };
152
- process.once("SIGINT", stop);
153
- process.once("SIGTERM", stop);
148
+ void reader.cancel('shutdown').catch(console.error)
149
+ }
150
+ process.once('SIGINT', stop)
151
+ process.once('SIGTERM', stop)
154
152
 
155
153
  try {
156
- await consumer.subscribe("orders");
154
+ await consumer.subscribe('orders')
157
155
 
158
156
  while (true) {
159
- const { value: messages, done } = await reader.read();
160
- if (done) break;
157
+ const { value: messages, done } = await reader.read()
158
+ if (done) break
161
159
 
162
- const processed = new Map();
160
+ const processed = new Map()
163
161
  for (const message of messages) {
164
162
  // Replace this with an awaited, idempotent database write or handler.
165
163
  if (message.isTombstone) {
166
- console.log("Delete:", message.key?.toString());
164
+ console.log('Delete:', message.key?.toString())
167
165
  } else {
168
- console.log("Order:", JSON.parse(message.payload.toString()));
166
+ console.log('Order:', JSON.parse(message.payload.toString()))
169
167
  }
170
- processed.set(
171
- JSON.stringify([message.topic, message.partition]),
172
- message,
173
- );
168
+ processed.set(JSON.stringify([message.topic, message.partition]), message)
174
169
  }
175
170
 
176
171
  // Commit once per topic/partition, only after the entire batch succeeds.
177
172
  for (const message of processed.values()) {
178
- await consumer.commitMessage(message, "Sync");
173
+ await consumer.commitMessage(message, 'Sync')
179
174
  }
180
175
  }
181
176
  } finally {
182
- process.off("SIGINT", stop);
183
- process.off("SIGTERM", stop);
177
+ process.off('SIGINT', stop)
178
+ process.off('SIGTERM', stop)
184
179
  try {
185
- await reader.cancel();
180
+ await reader.cancel()
186
181
  } finally {
187
- reader.releaseLock();
188
- await consumer.disconnect();
182
+ reader.releaseLock()
183
+ await consumer.disconnect()
189
184
  }
190
185
  }
191
186
  ```
@@ -311,12 +306,12 @@ these consumer properties against your own workload:
311
306
 
312
307
  ```js
313
308
  const configuration = {
314
- "queued.max.messages.kbytes": 65536,
315
- "queued.min.messages": 256,
316
- "fetch.max.bytes": 8 * 1024 * 1024,
317
- "max.partition.fetch.bytes": 1024 * 1024,
318
- "fetch.queue.backoff.ms": 20,
319
- };
309
+ 'queued.max.messages.kbytes': 65536,
310
+ 'queued.min.messages': 256,
311
+ 'fetch.max.bytes': 8 * 1024 * 1024,
312
+ 'max.partition.fetch.bytes': 1024 * 1024,
313
+ 'fetch.queue.backoff.ms': 20,
314
+ }
320
315
  ```
321
316
 
322
317
  In the [concurrent workload](docs/rfc/review/performance.md#concurrent-workload-with-natural-gc--2026-09-12),
@@ -1,6 +1,5 @@
1
1
  import { CommitMode, KafkaConsumer, Message, OffsetModel, TopicPartitionConfig } from "../js-binding.js";
2
2
  import { Readable, ReadableOptions } from "node:stream";
3
- //#region js-src/streams/base-kafka-stream-readable.d.ts
4
3
  interface KafkaStreamReadableOptions extends ReadableOptions {
5
4
  kafkaConsumer: KafkaConsumer;
6
5
  }
@@ -63,6 +62,5 @@ declare abstract class BaseKafkaStreamReadable extends Readable {
63
62
  */
64
63
  abstract _read(): void;
65
64
  }
66
- //#endregion
67
65
  export { KafkaStreamReadableOptions as n, BaseKafkaStreamReadable as t };
68
- //# sourceMappingURL=base-kafka-stream-readable-CtlWvan5.d.ts.map
66
+ //# sourceMappingURL=base-kafka-stream-readable-DhcM_Cxe.d.cts.map
@@ -1,6 +1,5 @@
1
1
  import { CommitMode, KafkaConsumer, Message, OffsetModel, TopicPartitionConfig } from "../js-binding.js";
2
2
  import { Readable, ReadableOptions } from "node:stream";
3
- //#region js-src/streams/base-kafka-stream-readable.d.ts
4
3
  interface KafkaStreamReadableOptions extends ReadableOptions {
5
4
  kafkaConsumer: KafkaConsumer;
6
5
  }
@@ -63,6 +62,5 @@ declare abstract class BaseKafkaStreamReadable extends Readable {
63
62
  */
64
63
  abstract _read(): void;
65
64
  }
66
- //#endregion
67
65
  export { KafkaStreamReadableOptions as n, BaseKafkaStreamReadable as t };
68
- //# sourceMappingURL=base-kafka-stream-readable-CtlWvan5.d.cts.map
66
+ //# sourceMappingURL=base-kafka-stream-readable-DhcM_Cxe.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import { Message, ProducerRecord, RecordMetadata } from "../js-binding.js";
2
2
  import { Channel } from "node:diagnostics_channel";
3
- //#region js-src/diagnostics/channels.d.ts
4
3
  declare const CHANNEL_NAMES: {
5
4
  readonly PRODUCER_SEND_START: 'kafka-crab:producer:send:start';
6
5
  readonly PRODUCER_SEND_END: 'kafka-crab:producer:send:end';
@@ -127,6 +126,5 @@ declare const channels: {
127
126
  readonly batchProcessStart: TypedChannel<BatchProcessStartEvent>;
128
127
  readonly batchProcessEnd: TypedChannel<BatchProcessEndEvent>;
129
128
  };
130
- //#endregion
131
129
  export { consumerProcessStartChannel as C, producerSendErrorChannel as D, producerSendEndChannel as E, producerSendStartChannel as O, consumerProcessEndChannel as S, consumerReceiveStartChannel as T, batchProcessEndChannel as _, BatchReceiveStartEvent as a, batchReceiveStartChannel as b, ConsumerProcessEndEvent as c, ConsumerReceiveStartEvent as d, KafkaEvent as f, TypedChannel as g, ProducerSendStartEvent as h, BatchReceiveEndEvent as i, ConsumerProcessStartEvent as l, ProducerSendErrorEvent as m, BatchProcessEndEvent as n, CHANNEL_NAMES as o, ProducerSendEndEvent as p, BatchProcessStartEvent as r, ChannelName as s, BaseEvent as t, ConsumerReceiveEndEvent as u, batchProcessStartChannel as v, consumerReceiveEndChannel as w, channels as x, batchReceiveEndChannel as y };
132
- //# sourceMappingURL=channels-CCvEbkFg.d.ts.map
130
+ //# sourceMappingURL=channels-B58YR3qB.d.ts.map
@@ -1,6 +1,5 @@
1
1
  import { Channel } from "node:diagnostics_channel";
2
2
  import { Message, ProducerRecord, RecordMetadata } from "../js-binding.js";
3
- //#region js-src/diagnostics/channels.d.ts
4
3
  declare const CHANNEL_NAMES: {
5
4
  readonly PRODUCER_SEND_START: 'kafka-crab:producer:send:start';
6
5
  readonly PRODUCER_SEND_END: 'kafka-crab:producer:send:end';
@@ -127,6 +126,5 @@ declare const channels: {
127
126
  readonly batchProcessStart: TypedChannel<BatchProcessStartEvent>;
128
127
  readonly batchProcessEnd: TypedChannel<BatchProcessEndEvent>;
129
128
  };
130
- //#endregion
131
129
  export { consumerProcessStartChannel as C, producerSendErrorChannel as D, producerSendEndChannel as E, producerSendStartChannel as O, consumerProcessEndChannel as S, consumerReceiveStartChannel as T, batchProcessEndChannel as _, BatchReceiveStartEvent as a, batchReceiveStartChannel as b, ConsumerProcessEndEvent as c, ConsumerReceiveStartEvent as d, KafkaEvent as f, TypedChannel as g, ProducerSendStartEvent as h, BatchReceiveEndEvent as i, ConsumerProcessStartEvent as l, ProducerSendErrorEvent as m, BatchProcessEndEvent as n, CHANNEL_NAMES as o, ProducerSendEndEvent as p, BatchProcessStartEvent as r, ChannelName as s, BaseEvent as t, ConsumerReceiveEndEvent as u, batchProcessStartChannel as v, consumerReceiveEndChannel as w, channels as x, batchReceiveEndChannel as y };
132
- //# sourceMappingURL=channels-D4ZtiwQz.d.cts.map
130
+ //# sourceMappingURL=channels-w3H3WXjh.d.cts.map
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  let node_diagnostics_channel = require("node:diagnostics_channel");
3
- //#region js-src/diagnostics/channels.ts
3
+ // js-src/diagnostics/channels.ts
4
4
  /**
5
5
  * Kafka Diagnostic Channels
6
6
  *
@@ -67,7 +67,6 @@ const channels = {
67
67
  batchProcessStart: batchProcessStartChannel,
68
68
  batchProcessEnd: batchProcessEndChannel
69
69
  };
70
- //#endregion
71
70
  exports.CHANNEL_NAMES = CHANNEL_NAMES;
72
71
  exports.batchProcessEndChannel = batchProcessEndChannel;
73
72
  exports.batchProcessStartChannel = batchProcessStartChannel;
@@ -1,2 +1,2 @@
1
- import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-D4ZtiwQz.cjs";
1
+ import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-w3H3WXjh.cjs";
2
2
  export { BaseEvent, BatchProcessEndEvent, BatchProcessStartEvent, BatchReceiveEndEvent, BatchReceiveStartEvent, CHANNEL_NAMES, ChannelName, ConsumerProcessEndEvent, ConsumerProcessStartEvent, ConsumerReceiveEndEvent, ConsumerReceiveStartEvent, KafkaEvent, ProducerSendEndEvent, ProducerSendErrorEvent, ProducerSendStartEvent, TypedChannel, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
@@ -1,2 +1,2 @@
1
- import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-CCvEbkFg.js";
1
+ import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-B58YR3qB.js";
2
2
  export { BaseEvent, BatchProcessEndEvent, BatchProcessStartEvent, BatchReceiveEndEvent, BatchReceiveStartEvent, CHANNEL_NAMES, ChannelName, ConsumerProcessEndEvent, ConsumerProcessStartEvent, ConsumerReceiveEndEvent, ConsumerReceiveStartEvent, KafkaEvent, ProducerSendEndEvent, ProducerSendErrorEvent, ProducerSendStartEvent, TypedChannel, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
@@ -1,5 +1,5 @@
1
1
  import { channel } from "node:diagnostics_channel";
2
- //#region js-src/diagnostics/channels.ts
2
+ // js-src/diagnostics/channels.ts
3
3
  /**
4
4
  * Kafka Diagnostic Channels
5
5
  *
@@ -66,7 +66,6 @@ const channels = {
66
66
  batchProcessStart: batchProcessStartChannel,
67
67
  batchProcessEnd: batchProcessEndChannel
68
68
  };
69
- //#endregion
70
69
  export { CHANNEL_NAMES, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
71
70
 
72
71
  //# sourceMappingURL=channels.js.map
@@ -1,3 +1,3 @@
1
- import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-D4ZtiwQz.cjs";
2
- import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-Cd62Qkxq.cjs";
1
+ import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-w3H3WXjh.cjs";
2
+ import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-BfAIYxQY.cjs";
3
3
  export { type BaseEvent, type BatchProcessEndEvent, type BatchProcessStartEvent, type BatchReceiveEndEvent, type BatchReceiveStartEvent, CHANNEL_NAMES, type ChannelName, type ConsumerProcessEndEvent, type ConsumerProcessStartEvent, type ConsumerReceiveEndEvent, type ConsumerReceiveStartEvent, type DiagnosticInstrumentationConfig, type KafkaEvent, type ProducerSendEndEvent, type ProducerSendErrorEvent, type ProducerSendStartEvent, type TypedChannel, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
@@ -1,3 +1,3 @@
1
- import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-CCvEbkFg.js";
2
- import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-Cd62Qkxq.js";
1
+ import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, f as KafkaEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "../channels-B58YR3qB.js";
2
+ import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-BfAIYxQY.js";
3
3
  export { type BaseEvent, type BatchProcessEndEvent, type BatchProcessStartEvent, type BatchReceiveEndEvent, type BatchReceiveStartEvent, CHANNEL_NAMES, type ChannelName, type ConsumerProcessEndEvent, type ConsumerProcessStartEvent, type ConsumerReceiveEndEvent, type ConsumerReceiveStartEvent, type DiagnosticInstrumentationConfig, type KafkaEvent, type ProducerSendEndEvent, type ProducerSendErrorEvent, type ProducerSendStartEvent, type TypedChannel, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
@@ -1,6 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_diagnostics_channels = require("./channels.cjs");
3
- //#region js-src/diagnostics/instrumentation.ts
3
+ // js-src/diagnostics/instrumentation.ts
4
4
  /**
5
5
  * Instruments a producer send method to publish diagnostic events
6
6
  */
@@ -324,7 +324,6 @@ function instrumentBatchReadableStream(originalStream, groupId, size, timeoutMs,
324
324
  }
325
325
  });
326
326
  }
327
- //#endregion
328
327
  exports.instrumentBatchReadableStream = instrumentBatchReadableStream;
329
328
  exports.instrumentBatchReceive = instrumentBatchReceive;
330
329
  exports.instrumentConsumerReadableStream = instrumentConsumerReadableStream;
@@ -1,2 +1,2 @@
1
- import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-Cd62Qkxq.cjs";
1
+ import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-BfAIYxQY.cjs";
2
2
  export { DiagnosticInstrumentationConfig, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend };
@@ -1,2 +1,2 @@
1
- import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-Cd62Qkxq.js";
1
+ import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "../instrumentation-BfAIYxQY.js";
2
2
  export { DiagnosticInstrumentationConfig, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend };
@@ -1,5 +1,5 @@
1
1
  import { batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel } from "./channels.js";
2
- //#region js-src/diagnostics/instrumentation.ts
2
+ // js-src/diagnostics/instrumentation.ts
3
3
  /**
4
4
  * Instruments a producer send method to publish diagnostic events
5
5
  */
@@ -323,7 +323,6 @@ function instrumentBatchReadableStream(originalStream, groupId, size, timeoutMs,
323
323
  }
324
324
  });
325
325
  }
326
- //#endregion
327
326
  export { instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend };
328
327
 
329
328
  //# sourceMappingURL=instrumentation.js.map
package/dist/index.cjs CHANGED
@@ -1,14 +1,20 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  const require_diagnostics_channels = require("./diagnostics/channels.cjs");
3
3
  const require_diagnostics_instrumentation = require("./diagnostics/instrumentation.cjs");
4
+ const require_kafka_client = require("./kafka-client.cjs");
4
5
  const require_streams_base_kafka_stream_readable = require("./streams/base-kafka-stream-readable.cjs");
5
6
  const require_streams_kafka_batch_stream_readable = require("./streams/kafka-batch-stream-readable.cjs");
6
7
  const require_streams_kafka_stream_readable = require("./streams/kafka-stream-readable.cjs");
7
- const require_kafka_client = require("./kafka-client.cjs");
8
8
  require("./diagnostics/index.cjs");
9
9
  let js_binding_js = require("../js-binding.js");
10
10
  exports.BaseKafkaStreamReadable = require_streams_base_kafka_stream_readable.BaseKafkaStreamReadable;
11
11
  exports.CHANNEL_NAMES = require_diagnostics_channels.CHANNEL_NAMES;
12
+ Object.defineProperty(exports, "KafkaAdmin", {
13
+ enumerable: true,
14
+ get: function() {
15
+ return js_binding_js.KafkaAdmin;
16
+ }
17
+ });
12
18
  exports.KafkaBatchStreamReadable = require_streams_kafka_batch_stream_readable.KafkaBatchStreamReadable;
13
19
  exports.KafkaClient = require_kafka_client.KafkaClient;
14
20
  Object.defineProperty(exports, "KafkaClientConfig", {
package/dist/index.d.cts CHANGED
@@ -1,10 +1,10 @@
1
- import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "./channels-D4ZtiwQz.cjs";
2
- import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "./instrumentation-Cd62Qkxq.cjs";
3
- import "./diagnostics/index.cjs";
4
- import { t as BaseKafkaStreamReadable } from "./base-kafka-stream-readable-CtlWvan5.cjs";
1
+ import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "./channels-w3H3WXjh.cjs";
2
+ import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "./instrumentation-BfAIYxQY.cjs";
3
+ import { KafkaClient, KafkaClientConfiguration, StreamConsumerConfiguration, WebStreamConsumer, WebStreamConsumerConfiguration } from "./kafka-client.cjs";
4
+ import { t as BaseKafkaStreamReadable } from "./base-kafka-stream-readable-DhcM_Cxe.cjs";
5
5
  import { KafkaBatchStreamReadable } from "./streams/kafka-batch-stream-readable.cjs";
6
6
  import { KafkaStreamReadable } from "./streams/kafka-stream-readable.cjs";
7
- import { n as SendFailureError } from "./send-failure-DMmbzTJn.cjs";
8
- import { KafkaClient, KafkaClientConfiguration, StreamConsumerConfiguration, WebStreamConsumer, WebStreamConsumerConfiguration } from "./kafka-client.cjs";
9
- import { CommitMode, CompactMessageBatch, ConsumerConfiguration, KafkaClientConfig, KafkaConfiguration, KafkaConsumer, KafkaCrabError, KafkaEvent, KafkaEventName, KafkaEventPayload, KafkaProducer, Message, MessageProducer, OffsetModel, PartitionOffset, PartitionPosition, ProducerConfiguration, ProducerRecord, RecordMetadata, SecurityProtocol, TopicPartition, TopicPartitionConfig } from "../js-binding.js";
10
- export { type BaseEvent, BaseKafkaStreamReadable, type BatchProcessEndEvent, type BatchProcessStartEvent, type BatchReceiveEndEvent, type BatchReceiveStartEvent, CHANNEL_NAMES, type ChannelName, type CommitMode, type CompactMessageBatch, type ConsumerConfiguration, type ConsumerProcessEndEvent, type ConsumerProcessStartEvent, type ConsumerReceiveEndEvent, type ConsumerReceiveStartEvent, type DiagnosticInstrumentationConfig, KafkaBatchStreamReadable, KafkaClient, KafkaClientConfig, type KafkaClientConfiguration, type KafkaConfiguration, KafkaConsumer, type KafkaCrabError, type KafkaEvent, type KafkaEventName, type KafkaEventPayload, KafkaProducer, KafkaStreamReadable, type Message, type MessageProducer, type OffsetModel, type PartitionOffset, type PartitionPosition, type ProducerConfiguration, type ProducerRecord, type ProducerSendEndEvent, type ProducerSendErrorEvent, type ProducerSendStartEvent, type RecordMetadata, type SecurityProtocol, type SendFailureError, type StreamConsumerConfiguration, type TopicPartition, type TopicPartitionConfig, type TypedChannel, type WebStreamConsumer, type WebStreamConsumerConfiguration, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
7
+ import { n as SendFailureError } from "./send-failure-CliKeTof.cjs";
8
+ import "./diagnostics/index.cjs";
9
+ import { AdminConfiguration, AdminGroupDescription, AdminGroupMember, AdminGroupOffsets, AdminPartitionMetadata, AdminPartitionOffset, AdminTopic, AdminTopicMetadata, AdminTopicOffset, AdminTopicResult, CommitMode, CompactMessageBatch, ConsumerConfiguration, CreateTopicsOptions, FetchOffsetsOptions, KafkaAdmin, KafkaClientConfig, KafkaConfiguration, KafkaConsumer, KafkaCrabError, KafkaEvent, KafkaEventName, KafkaEventPayload, KafkaProducer, Message, MessageProducer, OffsetModel, PartitionOffset, PartitionPosition, ProducerConfiguration, ProducerRecord, RecordMetadata, SecurityProtocol, TopicPartition, TopicPartitionConfig } from "../js-binding.js";
10
+ export { type AdminConfiguration, type AdminGroupDescription, type AdminGroupMember, type AdminGroupOffsets, type AdminPartitionMetadata, type AdminPartitionOffset, type AdminTopic, type AdminTopicMetadata, type AdminTopicOffset, type AdminTopicResult, type BaseEvent, BaseKafkaStreamReadable, type BatchProcessEndEvent, type BatchProcessStartEvent, type BatchReceiveEndEvent, type BatchReceiveStartEvent, CHANNEL_NAMES, type ChannelName, type CommitMode, type CompactMessageBatch, type ConsumerConfiguration, type ConsumerProcessEndEvent, type ConsumerProcessStartEvent, type ConsumerReceiveEndEvent, type ConsumerReceiveStartEvent, type CreateTopicsOptions, type DiagnosticInstrumentationConfig, type FetchOffsetsOptions, KafkaAdmin, KafkaBatchStreamReadable, KafkaClient, KafkaClientConfig, type KafkaClientConfiguration, type KafkaConfiguration, KafkaConsumer, type KafkaCrabError, type KafkaEvent, type KafkaEventName, type KafkaEventPayload, KafkaProducer, KafkaStreamReadable, type Message, type MessageProducer, type OffsetModel, type PartitionOffset, type PartitionPosition, type ProducerConfiguration, type ProducerRecord, type ProducerSendEndEvent, type ProducerSendErrorEvent, type ProducerSendStartEvent, type RecordMetadata, type SecurityProtocol, type SendFailureError, type StreamConsumerConfiguration, type TopicPartition, type TopicPartitionConfig, type TypedChannel, type WebStreamConsumer, type WebStreamConsumerConfiguration, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "./channels-CCvEbkFg.js";
2
- import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "./instrumentation-Cd62Qkxq.js";
3
- import "./diagnostics/index.js";
4
- import { t as BaseKafkaStreamReadable } from "./base-kafka-stream-readable-CtlWvan5.js";
1
+ import { C as consumerProcessStartChannel, D as producerSendErrorChannel, E as producerSendEndChannel, O as producerSendStartChannel, S as consumerProcessEndChannel, T as consumerReceiveStartChannel, _ as batchProcessEndChannel, a as BatchReceiveStartEvent, b as batchReceiveStartChannel, c as ConsumerProcessEndEvent, d as ConsumerReceiveStartEvent, g as TypedChannel, h as ProducerSendStartEvent, i as BatchReceiveEndEvent, l as ConsumerProcessStartEvent, m as ProducerSendErrorEvent, n as BatchProcessEndEvent, o as CHANNEL_NAMES, p as ProducerSendEndEvent, r as BatchProcessStartEvent, s as ChannelName, t as BaseEvent, u as ConsumerReceiveEndEvent, v as batchProcessStartChannel, w as consumerReceiveEndChannel, x as channels, y as batchReceiveEndChannel } from "./channels-B58YR3qB.js";
2
+ import { a as instrumentConsumerReceive, i as instrumentConsumerReadableStream, n as instrumentBatchReadableStream, o as instrumentProducerSend, r as instrumentBatchReceive, t as DiagnosticInstrumentationConfig } from "./instrumentation-BfAIYxQY.js";
3
+ import { KafkaClient, KafkaClientConfiguration, StreamConsumerConfiguration, WebStreamConsumer, WebStreamConsumerConfiguration } from "./kafka-client.js";
4
+ import { t as BaseKafkaStreamReadable } from "./base-kafka-stream-readable-DhcM_Cxe.js";
5
5
  import { KafkaBatchStreamReadable } from "./streams/kafka-batch-stream-readable.js";
6
6
  import { KafkaStreamReadable } from "./streams/kafka-stream-readable.js";
7
- import { n as SendFailureError } from "./send-failure-DMmbzTJn.js";
8
- import { KafkaClient, KafkaClientConfiguration, StreamConsumerConfiguration, WebStreamConsumer, WebStreamConsumerConfiguration } from "./kafka-client.js";
9
- import { CommitMode, CompactMessageBatch, ConsumerConfiguration, KafkaClientConfig, KafkaConfiguration, KafkaConsumer, KafkaCrabError, KafkaEvent, KafkaEventName, KafkaEventPayload, KafkaProducer, Message, MessageProducer, OffsetModel, PartitionOffset, PartitionPosition, ProducerConfiguration, ProducerRecord, RecordMetadata, SecurityProtocol, TopicPartition, TopicPartitionConfig } from "../js-binding.js";
10
- export { type BaseEvent, BaseKafkaStreamReadable, type BatchProcessEndEvent, type BatchProcessStartEvent, type BatchReceiveEndEvent, type BatchReceiveStartEvent, CHANNEL_NAMES, type ChannelName, type CommitMode, type CompactMessageBatch, type ConsumerConfiguration, type ConsumerProcessEndEvent, type ConsumerProcessStartEvent, type ConsumerReceiveEndEvent, type ConsumerReceiveStartEvent, type DiagnosticInstrumentationConfig, KafkaBatchStreamReadable, KafkaClient, KafkaClientConfig, type KafkaClientConfiguration, type KafkaConfiguration, KafkaConsumer, type KafkaCrabError, type KafkaEvent, type KafkaEventName, type KafkaEventPayload, KafkaProducer, KafkaStreamReadable, type Message, type MessageProducer, type OffsetModel, type PartitionOffset, type PartitionPosition, type ProducerConfiguration, type ProducerRecord, type ProducerSendEndEvent, type ProducerSendErrorEvent, type ProducerSendStartEvent, type RecordMetadata, type SecurityProtocol, type SendFailureError, type StreamConsumerConfiguration, type TopicPartition, type TopicPartitionConfig, type TypedChannel, type WebStreamConsumer, type WebStreamConsumerConfiguration, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
7
+ import { n as SendFailureError } from "./send-failure-CliKeTof.js";
8
+ import "./diagnostics/index.js";
9
+ import { AdminConfiguration, AdminGroupDescription, AdminGroupMember, AdminGroupOffsets, AdminPartitionMetadata, AdminPartitionOffset, AdminTopic, AdminTopicMetadata, AdminTopicOffset, AdminTopicResult, CommitMode, CompactMessageBatch, ConsumerConfiguration, CreateTopicsOptions, FetchOffsetsOptions, KafkaAdmin, KafkaClientConfig, KafkaConfiguration, KafkaConsumer, KafkaCrabError, KafkaEvent, KafkaEventName, KafkaEventPayload, KafkaProducer, Message, MessageProducer, OffsetModel, PartitionOffset, PartitionPosition, ProducerConfiguration, ProducerRecord, RecordMetadata, SecurityProtocol, TopicPartition, TopicPartitionConfig } from "../js-binding.js";
10
+ export { type AdminConfiguration, type AdminGroupDescription, type AdminGroupMember, type AdminGroupOffsets, type AdminPartitionMetadata, type AdminPartitionOffset, type AdminTopic, type AdminTopicMetadata, type AdminTopicOffset, type AdminTopicResult, type BaseEvent, BaseKafkaStreamReadable, type BatchProcessEndEvent, type BatchProcessStartEvent, type BatchReceiveEndEvent, type BatchReceiveStartEvent, CHANNEL_NAMES, type ChannelName, type CommitMode, type CompactMessageBatch, type ConsumerConfiguration, type ConsumerProcessEndEvent, type ConsumerProcessStartEvent, type ConsumerReceiveEndEvent, type ConsumerReceiveStartEvent, type CreateTopicsOptions, type DiagnosticInstrumentationConfig, type FetchOffsetsOptions, KafkaAdmin, KafkaBatchStreamReadable, KafkaClient, KafkaClientConfig, type KafkaClientConfiguration, type KafkaConfiguration, KafkaConsumer, type KafkaCrabError, type KafkaEvent, type KafkaEventName, type KafkaEventPayload, KafkaProducer, KafkaStreamReadable, type Message, type MessageProducer, type OffsetModel, type PartitionOffset, type PartitionPosition, type ProducerConfiguration, type ProducerRecord, type ProducerSendEndEvent, type ProducerSendErrorEvent, type ProducerSendStartEvent, type RecordMetadata, type SecurityProtocol, type SendFailureError, type StreamConsumerConfiguration, type TopicPartition, type TopicPartitionConfig, type TypedChannel, type WebStreamConsumer, type WebStreamConsumerConfiguration, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { CHANNEL_NAMES, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel } from "./diagnostics/channels.js";
2
2
  import { instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend } from "./diagnostics/instrumentation.js";
3
+ import { KafkaClient } from "./kafka-client.js";
3
4
  import { BaseKafkaStreamReadable } from "./streams/base-kafka-stream-readable.js";
4
5
  import { KafkaBatchStreamReadable } from "./streams/kafka-batch-stream-readable.js";
5
6
  import { KafkaStreamReadable } from "./streams/kafka-stream-readable.js";
6
- import { KafkaClient } from "./kafka-client.js";
7
7
  import "./diagnostics/index.js";
8
- import { KafkaClientConfig, KafkaConsumer, KafkaProducer } from "../js-binding.js";
9
- export { BaseKafkaStreamReadable, CHANNEL_NAMES, KafkaBatchStreamReadable, KafkaClient, KafkaClientConfig, KafkaConsumer, KafkaProducer, KafkaStreamReadable, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
8
+ import { KafkaAdmin, KafkaClientConfig, KafkaConsumer, KafkaProducer } from "../js-binding.js";
9
+ export { BaseKafkaStreamReadable, CHANNEL_NAMES, KafkaAdmin, KafkaBatchStreamReadable, KafkaClient, KafkaClientConfig, KafkaConsumer, KafkaProducer, KafkaStreamReadable, batchProcessEndChannel, batchProcessStartChannel, batchReceiveEndChannel, batchReceiveStartChannel, channels, consumerProcessEndChannel, consumerProcessStartChannel, consumerReceiveEndChannel, consumerReceiveStartChannel, instrumentBatchReadableStream, instrumentBatchReceive, instrumentConsumerReadableStream, instrumentConsumerReceive, instrumentProducerSend, producerSendEndChannel, producerSendErrorChannel, producerSendStartChannel };
@@ -1,5 +1,4 @@
1
1
  import { KafkaConsumer, KafkaProducer, Message, ProducerRecord, RecordMetadata } from "../js-binding.js";
2
- //#region js-src/diagnostics/instrumentation.d.ts
3
2
  /**
4
3
  * Configuration for diagnostic channel instrumentation
5
4
  */
@@ -31,6 +30,5 @@ declare function instrumentConsumerReadableStream<StreamMessage extends Message>
31
30
  * Instruments a ReadableStream of message batches with batch diagnostic events.
32
31
  */
33
32
  declare function instrumentBatchReadableStream<StreamBatch extends Message[]>(originalStream: ReadableStream<StreamBatch>, groupId: string | undefined, size: number, timeoutMs: number, config?: DiagnosticInstrumentationConfig): ReadableStream<StreamBatch>;
34
- //#endregion
35
33
  export { instrumentConsumerReceive as a, instrumentConsumerReadableStream as i, instrumentBatchReadableStream as n, instrumentProducerSend as o, instrumentBatchReceive as r, DiagnosticInstrumentationConfig as t };
36
- //# sourceMappingURL=instrumentation-Cd62Qkxq.d.ts.map
34
+ //# sourceMappingURL=instrumentation-BfAIYxQY.d.cts.map
@@ -1,5 +1,4 @@
1
1
  import { KafkaConsumer, KafkaProducer, Message, ProducerRecord, RecordMetadata } from "../js-binding.js";
2
- //#region js-src/diagnostics/instrumentation.d.ts
3
2
  /**
4
3
  * Configuration for diagnostic channel instrumentation
5
4
  */
@@ -31,6 +30,5 @@ declare function instrumentConsumerReadableStream<StreamMessage extends Message>
31
30
  * Instruments a ReadableStream of message batches with batch diagnostic events.
32
31
  */
33
32
  declare function instrumentBatchReadableStream<StreamBatch extends Message[]>(originalStream: ReadableStream<StreamBatch>, groupId: string | undefined, size: number, timeoutMs: number, config?: DiagnosticInstrumentationConfig): ReadableStream<StreamBatch>;
34
- //#endregion
35
33
  export { instrumentConsumerReceive as a, instrumentConsumerReadableStream as i, instrumentBatchReadableStream as n, instrumentProducerSend as o, instrumentBatchReceive as r, DiagnosticInstrumentationConfig as t };
36
- //# sourceMappingURL=instrumentation-Cd62Qkxq.d.cts.map
34
+ //# sourceMappingURL=instrumentation-BfAIYxQY.d.ts.map
@@ -4,7 +4,7 @@ const require_send_failure = require("./send-failure.cjs");
4
4
  const require_streams_kafka_batch_stream_readable = require("./streams/kafka-batch-stream-readable.cjs");
5
5
  const require_streams_kafka_stream_readable = require("./streams/kafka-stream-readable.cjs");
6
6
  let js_binding_js = require("../js-binding.js");
7
- //#region js-src/kafka-client.ts
7
+ // js-src/kafka-client.ts
8
8
  const DEFAULT_WEB_STREAM_BATCH_TIMEOUT = 1e3;
9
9
  const DEFAULT_WEB_STREAM_SERIAL_PREFETCH_SIZE = 64;
10
10
  const DEFAULT_WEB_STREAM_SERIAL_PREFETCH_TIMEOUT = 1;
@@ -222,6 +222,10 @@ var KafkaClient = class {
222
222
  deleteRecords(topicPartitions) {
223
223
  return this.kafkaClientConfig.deleteRecords(topicPartitions);
224
224
  }
225
+ /** Creates an administrative client. Call close() when finished. */
226
+ createAdmin(configuration) {
227
+ return this.kafkaClientConfig.createAdmin(configuration);
228
+ }
225
229
  /**
226
230
  * Creates a KafkaConsumer instance
227
231
  * @param {ConsumerConfiguration} consumerConfiguration - Consumer configuration
@@ -303,7 +307,6 @@ var KafkaClient = class {
303
307
  return consumer;
304
308
  }
305
309
  };
306
- //#endregion
307
310
  exports.KafkaClient = KafkaClient;
308
311
  exports.expandCompactBatch = expandCompactBatch;
309
312