1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 | import * as net from 'net';
|
10 | import * as tls from 'tls';
|
11 | declare type Without<T, U> = {
|
12 | [P in Exclude<keyof T, keyof U>]?: never;
|
13 | };
|
14 | declare type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
|
15 | export declare class Kafka {
|
16 | constructor(config: KafkaConfig);
|
17 | producer(config?: ProducerConfig): Producer;
|
18 | consumer(config: ConsumerConfig): Consumer;
|
19 | admin(config?: AdminConfig): Admin;
|
20 | logger(): Logger;
|
21 | }
|
22 | export declare type BrokersFunction = () => string[] | Promise<string[]>;
|
23 | declare type SaslAuthenticationRequest = {
|
24 | encode: () => Buffer | Promise<Buffer>;
|
25 | };
|
26 | declare type SaslAuthenticationResponse<ParseResult> = {
|
27 | decode: (rawResponse: Buffer) => Buffer | Promise<Buffer>;
|
28 | parse: (data: Buffer) => ParseResult;
|
29 | };
|
30 | declare type Authenticator = {
|
31 | authenticate: () => Promise<void>;
|
32 | };
|
33 | declare type AuthenticationProviderArgs = {
|
34 | host: string;
|
35 | port: number;
|
36 | logger: Logger;
|
37 | saslAuthenticate: <ParseResult>(request: SaslAuthenticationRequest, response?: SaslAuthenticationResponse<ParseResult>) => Promise<ParseResult | void>;
|
38 | };
|
39 | declare type Mechanism = {
|
40 | mechanism: string;
|
41 | authenticationProvider: (args: AuthenticationProviderArgs) => Authenticator;
|
42 | };
|
43 | export interface KafkaConfig {
|
44 | brokers: string[] | BrokersFunction;
|
45 | ssl?: tls.ConnectionOptions | boolean;
|
46 | sasl?: SASLOptions | Mechanism;
|
47 | clientId?: string;
|
48 | connectionTimeout?: number;
|
49 | authenticationTimeout?: number;
|
50 | reauthenticationThreshold?: number;
|
51 | requestTimeout?: number;
|
52 | enforceRequestTimeout?: boolean;
|
53 | retry?: RetryOptions;
|
54 | socketFactory?: ISocketFactory;
|
55 | logLevel?: logLevel;
|
56 | logCreator?: logCreator;
|
57 | }
|
58 | export interface ISocketFactoryArgs {
|
59 | host: string;
|
60 | port: number;
|
61 | ssl: tls.ConnectionOptions;
|
62 | onConnect: () => void;
|
63 | }
|
64 | export declare type ISocketFactory = (args: ISocketFactoryArgs) => net.Socket;
|
65 | export interface OauthbearerProviderResponse {
|
66 | value: string;
|
67 | }
|
68 | declare type SASLMechanismOptionsMap = {
|
69 | plain: {
|
70 | username: string;
|
71 | password: string;
|
72 | };
|
73 | 'scram-sha-256': {
|
74 | username: string;
|
75 | password: string;
|
76 | };
|
77 | 'scram-sha-512': {
|
78 | username: string;
|
79 | password: string;
|
80 | };
|
81 | aws: {
|
82 | authorizationIdentity: string;
|
83 | accessKeyId: string;
|
84 | secretAccessKey: string;
|
85 | sessionToken?: string;
|
86 | };
|
87 | oauthbearer: {
|
88 | oauthBearerProvider: () => Promise<OauthbearerProviderResponse>;
|
89 | };
|
90 | };
|
91 | export declare type SASLMechanism = keyof SASLMechanismOptionsMap;
|
92 | declare type SASLMechanismOptions<T> = T extends SASLMechanism ? {
|
93 | mechanism: T;
|
94 | } & SASLMechanismOptionsMap[T] : never;
|
95 | export declare type SASLOptions = SASLMechanismOptions<SASLMechanism>;
|
96 | export interface ProducerConfig {
|
97 | createPartitioner?: ICustomPartitioner;
|
98 | retry?: RetryOptions;
|
99 | metadataMaxAge?: number;
|
100 | allowAutoTopicCreation?: boolean;
|
101 | idempotent?: boolean;
|
102 | transactionalId?: string;
|
103 | transactionTimeout?: number;
|
104 | maxInFlightRequests?: number;
|
105 | }
|
106 | export interface Message {
|
107 | key?: Buffer | string | null;
|
108 | value: Buffer | string | null;
|
109 | partition?: number;
|
110 | headers?: IHeaders;
|
111 | timestamp?: string;
|
112 | }
|
113 | export interface PartitionerArgs {
|
114 | topic: string;
|
115 | partitionMetadata: PartitionMetadata[];
|
116 | message: Message;
|
117 | }
|
118 | export declare type ICustomPartitioner = () => (args: PartitionerArgs) => number;
|
119 | export declare type DefaultPartitioner = ICustomPartitioner;
|
120 | export declare type LegacyPartitioner = ICustomPartitioner;
|
121 | export declare let Partitioners: {
|
122 | DefaultPartitioner: DefaultPartitioner;
|
123 | LegacyPartitioner: LegacyPartitioner;
|
124 | |
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 | JavaCompatiblePartitioner: DefaultPartitioner;
|
131 | };
|
132 | export declare type PartitionMetadata = {
|
133 | partitionErrorCode: number;
|
134 | partitionId: number;
|
135 | leader: number;
|
136 | replicas: number[];
|
137 | isr: number[];
|
138 | offlineReplicas?: number[];
|
139 | };
|
140 | export interface IHeaders {
|
141 | [key: string]: Buffer | string | (Buffer | string)[] | undefined;
|
142 | }
|
143 | export interface ConsumerConfig {
|
144 | groupId: string;
|
145 | partitionAssigners?: PartitionAssigner[];
|
146 | metadataMaxAge?: number;
|
147 | sessionTimeout?: number;
|
148 | rebalanceTimeout?: number;
|
149 | heartbeatInterval?: number;
|
150 | maxBytesPerPartition?: number;
|
151 | minBytes?: number;
|
152 | maxBytes?: number;
|
153 | maxWaitTimeInMs?: number;
|
154 | retry?: RetryOptions & {
|
155 | restartOnFailure?: (err: Error) => Promise<boolean>;
|
156 | };
|
157 | allowAutoTopicCreation?: boolean;
|
158 | maxInFlightRequests?: number;
|
159 | readUncommitted?: boolean;
|
160 | rackId?: string;
|
161 | }
|
162 | export declare type PartitionAssigner = (config: {
|
163 | cluster: Cluster;
|
164 | groupId: string;
|
165 | logger: Logger;
|
166 | }) => Assigner;
|
167 | export interface CoordinatorMetadata {
|
168 | errorCode: number;
|
169 | coordinator: {
|
170 | nodeId: number;
|
171 | host: string;
|
172 | port: number;
|
173 | };
|
174 | }
|
175 | export declare type Cluster = {
|
176 | getNodeIds(): number[];
|
177 | metadata(): Promise<BrokerMetadata>;
|
178 | removeBroker(options: {
|
179 | host: string;
|
180 | port: number;
|
181 | }): void;
|
182 | addMultipleTargetTopics(topics: string[]): Promise<void>;
|
183 | isConnected(): boolean;
|
184 | connect(): Promise<void>;
|
185 | disconnect(): Promise<void>;
|
186 | refreshMetadata(): Promise<void>;
|
187 | refreshMetadataIfNecessary(): Promise<void>;
|
188 | addTargetTopic(topic: string): Promise<void>;
|
189 | findBroker(node: {
|
190 | nodeId: string;
|
191 | }): Promise<Broker>;
|
192 | findControllerBroker(): Promise<Broker>;
|
193 | findTopicPartitionMetadata(topic: string): PartitionMetadata[];
|
194 | findLeaderForPartitions(topic: string, partitions: number[]): {
|
195 | [leader: string]: number[];
|
196 | };
|
197 | findGroupCoordinator(group: {
|
198 | groupId: string;
|
199 | }): Promise<Broker>;
|
200 | findGroupCoordinatorMetadata(group: {
|
201 | groupId: string;
|
202 | }): Promise<CoordinatorMetadata>;
|
203 | defaultOffset(config: {
|
204 | fromBeginning: boolean;
|
205 | }): number;
|
206 | fetchTopicsOffset(topics: Array<{
|
207 | topic: string;
|
208 | partitions: Array<{
|
209 | partition: number;
|
210 | }>;
|
211 | } & XOR<{
|
212 | fromBeginning: boolean;
|
213 | }, {
|
214 | fromTimestamp: number;
|
215 | }>>): Promise<TopicOffsets[]>;
|
216 | };
|
217 | export declare type Assignment = {
|
218 | [topic: string]: number[];
|
219 | };
|
220 | export declare type GroupMember = {
|
221 | memberId: string;
|
222 | memberMetadata: Buffer;
|
223 | };
|
224 | export declare type GroupMemberAssignment = {
|
225 | memberId: string;
|
226 | memberAssignment: Buffer;
|
227 | };
|
228 | export declare type GroupState = {
|
229 | name: string;
|
230 | metadata: Buffer;
|
231 | };
|
232 | export declare type Assigner = {
|
233 | name: string;
|
234 | version: number;
|
235 | assign(group: {
|
236 | members: GroupMember[];
|
237 | topics: string[];
|
238 | }): Promise<GroupMemberAssignment[]>;
|
239 | protocol(subscription: {
|
240 | topics: string[];
|
241 | }): GroupState;
|
242 | };
|
243 | export interface RetryOptions {
|
244 | maxRetryTime?: number;
|
245 | initialRetryTime?: number;
|
246 | factor?: number;
|
247 | multiplier?: number;
|
248 | retries?: number;
|
249 | restartOnFailure?: (e: Error) => Promise<boolean>;
|
250 | }
|
251 | export interface AdminConfig {
|
252 | retry?: RetryOptions;
|
253 | }
|
254 | export interface ITopicConfig {
|
255 | topic: string;
|
256 | numPartitions?: number;
|
257 | replicationFactor?: number;
|
258 | replicaAssignment?: object[];
|
259 | configEntries?: IResourceConfigEntry[];
|
260 | }
|
261 | export interface ITopicPartitionConfig {
|
262 | topic: string;
|
263 | count: number;
|
264 | assignments?: Array<Array<number>>;
|
265 | }
|
266 | export interface ITopicMetadata {
|
267 | name: string;
|
268 | partitions: PartitionMetadata[];
|
269 | }
|
270 | export declare enum AclResourceTypes {
|
271 | UNKNOWN = 0,
|
272 | ANY = 1,
|
273 | TOPIC = 2,
|
274 | GROUP = 3,
|
275 | CLUSTER = 4,
|
276 | TRANSACTIONAL_ID = 5,
|
277 | DELEGATION_TOKEN = 6
|
278 | }
|
279 | export declare enum ConfigResourceTypes {
|
280 | UNKNOWN = 0,
|
281 | TOPIC = 2,
|
282 | BROKER = 4,
|
283 | BROKER_LOGGER = 8
|
284 | }
|
285 | export declare enum ConfigSource {
|
286 | UNKNOWN = 0,
|
287 | TOPIC_CONFIG = 1,
|
288 | DYNAMIC_BROKER_CONFIG = 2,
|
289 | DYNAMIC_DEFAULT_BROKER_CONFIG = 3,
|
290 | STATIC_BROKER_CONFIG = 4,
|
291 | DEFAULT_CONFIG = 5,
|
292 | DYNAMIC_BROKER_LOGGER_CONFIG = 6
|
293 | }
|
294 | export declare enum AclPermissionTypes {
|
295 | UNKNOWN = 0,
|
296 | ANY = 1,
|
297 | DENY = 2,
|
298 | ALLOW = 3
|
299 | }
|
300 | export declare enum AclOperationTypes {
|
301 | UNKNOWN = 0,
|
302 | ANY = 1,
|
303 | ALL = 2,
|
304 | READ = 3,
|
305 | WRITE = 4,
|
306 | CREATE = 5,
|
307 | DELETE = 6,
|
308 | ALTER = 7,
|
309 | DESCRIBE = 8,
|
310 | CLUSTER_ACTION = 9,
|
311 | DESCRIBE_CONFIGS = 10,
|
312 | ALTER_CONFIGS = 11,
|
313 | IDEMPOTENT_WRITE = 12
|
314 | }
|
315 | export declare enum ResourcePatternTypes {
|
316 | UNKNOWN = 0,
|
317 | ANY = 1,
|
318 | MATCH = 2,
|
319 | LITERAL = 3,
|
320 | PREFIXED = 4
|
321 | }
|
322 | export interface ResourceConfigQuery {
|
323 | type: ConfigResourceTypes;
|
324 | name: string;
|
325 | configNames?: string[];
|
326 | }
|
327 | export interface ConfigEntries {
|
328 | configName: string;
|
329 | configValue: string;
|
330 | isDefault: boolean;
|
331 | configSource: ConfigSource;
|
332 | isSensitive: boolean;
|
333 | readOnly: boolean;
|
334 | configSynonyms: ConfigSynonyms[];
|
335 | }
|
336 | export interface ConfigSynonyms {
|
337 | configName: string;
|
338 | configValue: string;
|
339 | configSource: ConfigSource;
|
340 | }
|
341 | export interface DescribeConfigResponse {
|
342 | resources: {
|
343 | configEntries: ConfigEntries[];
|
344 | errorCode: number;
|
345 | errorMessage: string;
|
346 | resourceName: string;
|
347 | resourceType: ConfigResourceTypes;
|
348 | }[];
|
349 | throttleTime: number;
|
350 | }
|
351 | export interface IResourceConfigEntry {
|
352 | name: string;
|
353 | value: string;
|
354 | }
|
355 | export interface IResourceConfig {
|
356 | type: ConfigResourceTypes;
|
357 | name: string;
|
358 | configEntries: IResourceConfigEntry[];
|
359 | }
|
360 | declare type ValueOf<T> = T[keyof T];
|
361 | export declare type AdminEvents = {
|
362 | CONNECT: 'admin.connect';
|
363 | DISCONNECT: 'admin.disconnect';
|
364 | REQUEST: 'admin.network.request';
|
365 | REQUEST_TIMEOUT: 'admin.network.request_timeout';
|
366 | REQUEST_QUEUE_SIZE: 'admin.network.request_queue_size';
|
367 | };
|
368 | export interface InstrumentationEvent<T> {
|
369 | id: string;
|
370 | type: string;
|
371 | timestamp: number;
|
372 | payload: T;
|
373 | }
|
374 | export declare type RemoveInstrumentationEventListener<T> = () => void;
|
375 | export declare type ConnectEvent = InstrumentationEvent<null>;
|
376 | export declare type DisconnectEvent = InstrumentationEvent<null>;
|
377 | export declare type RequestEvent = InstrumentationEvent<{
|
378 | apiKey: number;
|
379 | apiName: string;
|
380 | apiVersion: number;
|
381 | broker: string;
|
382 | clientId: string;
|
383 | correlationId: number;
|
384 | createdAt: number;
|
385 | duration: number;
|
386 | pendingDuration: number;
|
387 | sentAt: number;
|
388 | size: number;
|
389 | }>;
|
390 | export declare type RequestTimeoutEvent = InstrumentationEvent<{
|
391 | apiKey: number;
|
392 | apiName: string;
|
393 | apiVersion: number;
|
394 | broker: string;
|
395 | clientId: string;
|
396 | correlationId: number;
|
397 | createdAt: number;
|
398 | pendingDuration: number;
|
399 | sentAt: number;
|
400 | }>;
|
401 | export declare type RequestQueueSizeEvent = InstrumentationEvent<{
|
402 | broker: string;
|
403 | clientId: string;
|
404 | queueSize: number;
|
405 | }>;
|
406 | export declare type SeekEntry = PartitionOffset;
|
407 | export declare type FetchOffsetsPartition = PartitionOffset & {
|
408 | metadata: string | null;
|
409 | };
|
410 | export interface Acl {
|
411 | principal: string;
|
412 | host: string;
|
413 | operation: AclOperationTypes;
|
414 | permissionType: AclPermissionTypes;
|
415 | }
|
416 | export interface AclResource {
|
417 | resourceType: AclResourceTypes;
|
418 | resourceName: string;
|
419 | resourcePatternType: ResourcePatternTypes;
|
420 | }
|
421 | export declare type AclEntry = Acl & AclResource;
|
422 | export declare type DescribeAclResource = AclResource & {
|
423 | acls: Acl[];
|
424 | };
|
425 | export interface DescribeAclResponse {
|
426 | throttleTime: number;
|
427 | errorCode: number;
|
428 | errorMessage?: string;
|
429 | resources: DescribeAclResource[];
|
430 | }
|
431 | export interface AclFilter {
|
432 | resourceType: AclResourceTypes;
|
433 | resourceName?: string;
|
434 | resourcePatternType: ResourcePatternTypes;
|
435 | principal?: string;
|
436 | host?: string;
|
437 | operation: AclOperationTypes;
|
438 | permissionType: AclPermissionTypes;
|
439 | }
|
440 | export interface MatchingAcl {
|
441 | errorCode: number;
|
442 | errorMessage?: string;
|
443 | resourceType: AclResourceTypes;
|
444 | resourceName: string;
|
445 | resourcePatternType: ResourcePatternTypes;
|
446 | principal: string;
|
447 | host: string;
|
448 | operation: AclOperationTypes;
|
449 | permissionType: AclPermissionTypes;
|
450 | }
|
451 | export interface DeleteAclFilterResponses {
|
452 | errorCode: number;
|
453 | errorMessage?: string;
|
454 | matchingAcls: MatchingAcl[];
|
455 | }
|
456 | export interface DeleteAclResponse {
|
457 | throttleTime: number;
|
458 | filterResponses: DeleteAclFilterResponses[];
|
459 | }
|
460 | export declare type Admin = {
|
461 | connect(): Promise<void>;
|
462 | disconnect(): Promise<void>;
|
463 | listTopics(): Promise<string[]>;
|
464 | createTopics(options: {
|
465 | validateOnly?: boolean;
|
466 | waitForLeaders?: boolean;
|
467 | timeout?: number;
|
468 | topics: ITopicConfig[];
|
469 | }): Promise<boolean>;
|
470 | deleteTopics(options: {
|
471 | topics: string[];
|
472 | timeout?: number;
|
473 | }): Promise<void>;
|
474 | createPartitions(options: {
|
475 | validateOnly?: boolean;
|
476 | timeout?: number;
|
477 | topicPartitions: ITopicPartitionConfig[];
|
478 | }): Promise<boolean>;
|
479 | fetchTopicMetadata(options?: {
|
480 | topics: string[];
|
481 | }): Promise<{
|
482 | topics: Array<ITopicMetadata>;
|
483 | }>;
|
484 | fetchOffsets(options: {
|
485 | groupId: string;
|
486 | topics?: string[];
|
487 | resolveOffsets?: boolean;
|
488 | }): Promise<Array<{
|
489 | topic: string;
|
490 | partitions: FetchOffsetsPartition[];
|
491 | }>>;
|
492 | fetchTopicOffsets(topic: string): Promise<Array<SeekEntry & {
|
493 | high: string;
|
494 | low: string;
|
495 | }>>;
|
496 | fetchTopicOffsetsByTimestamp(topic: string, timestamp?: number): Promise<Array<SeekEntry>>;
|
497 | describeCluster(): Promise<{
|
498 | brokers: Array<{
|
499 | nodeId: number;
|
500 | host: string;
|
501 | port: number;
|
502 | }>;
|
503 | controller: number | null;
|
504 | clusterId: string;
|
505 | }>;
|
506 | setOffsets(options: {
|
507 | groupId: string;
|
508 | topic: string;
|
509 | partitions: SeekEntry[];
|
510 | }): Promise<void>;
|
511 | resetOffsets(options: {
|
512 | groupId: string;
|
513 | topic: string;
|
514 | earliest: boolean;
|
515 | }): Promise<void>;
|
516 | describeConfigs(configs: {
|
517 | resources: ResourceConfigQuery[];
|
518 | includeSynonyms: boolean;
|
519 | }): Promise<DescribeConfigResponse>;
|
520 | alterConfigs(configs: {
|
521 | validateOnly: boolean;
|
522 | resources: IResourceConfig[];
|
523 | }): Promise<any>;
|
524 | listGroups(): Promise<{
|
525 | groups: GroupOverview[];
|
526 | }>;
|
527 | deleteGroups(groupIds: string[]): Promise<DeleteGroupsResult[]>;
|
528 | describeGroups(groupIds: string[]): Promise<GroupDescriptions>;
|
529 | describeAcls(options: AclFilter): Promise<DescribeAclResponse>;
|
530 | deleteAcls(options: {
|
531 | filters: AclFilter[];
|
532 | }): Promise<DeleteAclResponse>;
|
533 | createAcls(options: {
|
534 | acl: AclEntry[];
|
535 | }): Promise<boolean>;
|
536 | deleteTopicRecords(options: {
|
537 | topic: string;
|
538 | partitions: SeekEntry[];
|
539 | }): Promise<void>;
|
540 | logger(): Logger;
|
541 | on(eventName: AdminEvents['CONNECT'], listener: (event: ConnectEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
542 | on(eventName: AdminEvents['DISCONNECT'], listener: (event: DisconnectEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
543 | on(eventName: AdminEvents['REQUEST'], listener: (event: RequestEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
544 | on(eventName: AdminEvents['REQUEST_QUEUE_SIZE'], listener: (event: RequestQueueSizeEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
545 | on(eventName: AdminEvents['REQUEST_TIMEOUT'], listener: (event: RequestTimeoutEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
546 | on(eventName: ValueOf<AdminEvents>, listener: (event: InstrumentationEvent<any>) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
547 | readonly events: AdminEvents;
|
548 | };
|
549 | export declare let PartitionAssigners: {
|
550 | roundRobin: PartitionAssigner;
|
551 | };
|
552 | export interface ISerializer<T> {
|
553 | encode(value: T): Buffer;
|
554 | decode(buffer: Buffer): T | null;
|
555 | }
|
556 | export declare type MemberMetadata = {
|
557 | version: number;
|
558 | topics: string[];
|
559 | userData: Buffer;
|
560 | };
|
561 | export declare type MemberAssignment = {
|
562 | version: number;
|
563 | assignment: Assignment;
|
564 | userData: Buffer;
|
565 | };
|
566 | export declare let AssignerProtocol: {
|
567 | MemberMetadata: ISerializer<MemberMetadata>;
|
568 | MemberAssignment: ISerializer<MemberAssignment>;
|
569 | };
|
570 | export declare enum logLevel {
|
571 | NOTHING = 0,
|
572 | ERROR = 1,
|
573 | WARN = 2,
|
574 | INFO = 4,
|
575 | DEBUG = 5
|
576 | }
|
577 | export interface LogEntry {
|
578 | namespace: string;
|
579 | level: logLevel;
|
580 | label: string;
|
581 | log: LoggerEntryContent;
|
582 | }
|
583 | export interface LoggerEntryContent {
|
584 | readonly timestamp: string;
|
585 | readonly message: string;
|
586 | [key: string]: any;
|
587 | }
|
588 | export declare type logCreator = (logLevel: logLevel) => (entry: LogEntry) => void;
|
589 | export declare type Logger = {
|
590 | info: (message: string, extra?: object) => void;
|
591 | error: (message: string, extra?: object) => void;
|
592 | warn: (message: string, extra?: object) => void;
|
593 | debug: (message: string, extra?: object) => void;
|
594 | namespace: (namespace: string, logLevel?: logLevel) => Logger;
|
595 | setLogLevel: (logLevel: logLevel) => void;
|
596 | };
|
597 | export interface BrokerMetadata {
|
598 | brokers: Array<{
|
599 | nodeId: number;
|
600 | host: string;
|
601 | port: number;
|
602 | rack?: string;
|
603 | }>;
|
604 | topicMetadata: Array<{
|
605 | topicErrorCode: number;
|
606 | topic: string;
|
607 | partitionMetadata: PartitionMetadata[];
|
608 | }>;
|
609 | }
|
610 | export interface ApiVersions {
|
611 | [apiKey: number]: {
|
612 | minVersion: number;
|
613 | maxVersion: number;
|
614 | };
|
615 | }
|
616 | export declare type Broker = {
|
617 | isConnected(): boolean;
|
618 | connect(): Promise<void>;
|
619 | disconnect(): Promise<void>;
|
620 | apiVersions(): Promise<ApiVersions>;
|
621 | metadata(topics: string[]): Promise<BrokerMetadata>;
|
622 | describeGroups: (options: {
|
623 | groupIds: string[];
|
624 | }) => Promise<any>;
|
625 | offsetCommit(request: {
|
626 | groupId: string;
|
627 | groupGenerationId: number;
|
628 | memberId: string;
|
629 | retentionTime?: number;
|
630 | topics: TopicOffsets[];
|
631 | }): Promise<any>;
|
632 | offsetFetch(request: {
|
633 | groupId: string;
|
634 | topics: TopicOffsets[];
|
635 | }): Promise<{
|
636 | responses: TopicOffsets[];
|
637 | }>;
|
638 | fetch(request: {
|
639 | replicaId?: number;
|
640 | isolationLevel?: number;
|
641 | maxWaitTime?: number;
|
642 | minBytes?: number;
|
643 | maxBytes?: number;
|
644 | topics: Array<{
|
645 | topic: string;
|
646 | partitions: Array<{
|
647 | partition: number;
|
648 | fetchOffset: string;
|
649 | maxBytes: number;
|
650 | }>;
|
651 | }>;
|
652 | rackId?: string;
|
653 | }): Promise<any>;
|
654 | produce(request: {
|
655 | topicData: Array<{
|
656 | topic: string;
|
657 | partitions: Array<{
|
658 | partition: number;
|
659 | firstSequence?: number;
|
660 | messages: Message[];
|
661 | }>;
|
662 | }>;
|
663 | transactionalId?: string;
|
664 | producerId?: number;
|
665 | producerEpoch?: number;
|
666 | acks?: number;
|
667 | timeout?: number;
|
668 | compression?: CompressionTypes;
|
669 | }): Promise<any>;
|
670 | };
|
671 | interface MessageSetEntry {
|
672 | key: Buffer | null;
|
673 | value: Buffer | null;
|
674 | timestamp: string;
|
675 | attributes: number;
|
676 | offset: string;
|
677 | size: number;
|
678 | headers?: never;
|
679 | }
|
680 | interface RecordBatchEntry {
|
681 | key: Buffer | null;
|
682 | value: Buffer | null;
|
683 | timestamp: string;
|
684 | attributes: number;
|
685 | offset: string;
|
686 | headers: IHeaders;
|
687 | size?: never;
|
688 | }
|
689 | export declare type KafkaMessage = MessageSetEntry | RecordBatchEntry;
|
690 | export interface ProducerRecord {
|
691 | topic: string;
|
692 | messages: Message[];
|
693 | acks?: number;
|
694 | timeout?: number;
|
695 | compression?: CompressionTypes;
|
696 | }
|
697 | export declare type RecordMetadata = {
|
698 | topicName: string;
|
699 | partition: number;
|
700 | errorCode: number;
|
701 | offset?: string;
|
702 | timestamp?: string;
|
703 | baseOffset?: string;
|
704 | logAppendTime?: string;
|
705 | logStartOffset?: string;
|
706 | };
|
707 | export interface TopicMessages {
|
708 | topic: string;
|
709 | messages: Message[];
|
710 | }
|
711 | export interface ProducerBatch {
|
712 | acks?: number;
|
713 | timeout?: number;
|
714 | compression?: CompressionTypes;
|
715 | topicMessages?: TopicMessages[];
|
716 | }
|
717 | export interface PartitionOffset {
|
718 | partition: number;
|
719 | offset: string;
|
720 | }
|
721 | export interface TopicOffsets {
|
722 | topic: string;
|
723 | partitions: PartitionOffset[];
|
724 | }
|
725 | export interface Offsets {
|
726 | topics: TopicOffsets[];
|
727 | }
|
728 | declare type Sender = {
|
729 | send(record: ProducerRecord): Promise<RecordMetadata[]>;
|
730 | sendBatch(batch: ProducerBatch): Promise<RecordMetadata[]>;
|
731 | };
|
732 | export declare type ProducerEvents = {
|
733 | CONNECT: 'producer.connect';
|
734 | DISCONNECT: 'producer.disconnect';
|
735 | REQUEST: 'producer.network.request';
|
736 | REQUEST_TIMEOUT: 'producer.network.request_timeout';
|
737 | REQUEST_QUEUE_SIZE: 'producer.network.request_queue_size';
|
738 | };
|
739 | export declare type Producer = Sender & {
|
740 | connect(): Promise<void>;
|
741 | disconnect(): Promise<void>;
|
742 | isIdempotent(): boolean;
|
743 | readonly events: ProducerEvents;
|
744 | on(eventName: ProducerEvents['CONNECT'], listener: (event: ConnectEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
745 | on(eventName: ProducerEvents['DISCONNECT'], listener: (event: DisconnectEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
746 | on(eventName: ProducerEvents['REQUEST'], listener: (event: RequestEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
747 | on(eventName: ProducerEvents['REQUEST_QUEUE_SIZE'], listener: (event: RequestQueueSizeEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
748 | on(eventName: ProducerEvents['REQUEST_TIMEOUT'], listener: (event: RequestTimeoutEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
749 | on(eventName: ValueOf<ProducerEvents>, listener: (event: InstrumentationEvent<any>) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
750 | transaction(): Promise<Transaction>;
|
751 | logger(): Logger;
|
752 | };
|
753 | export declare type Transaction = Sender & {
|
754 | sendOffsets(offsets: Offsets & {
|
755 | consumerGroupId: string;
|
756 | }): Promise<void>;
|
757 | commit(): Promise<void>;
|
758 | abort(): Promise<void>;
|
759 | isActive(): boolean;
|
760 | };
|
761 | export declare type ConsumerGroup = {
|
762 | groupId: string;
|
763 | generationId: number;
|
764 | memberId: string;
|
765 | coordinator: Broker;
|
766 | };
|
767 | export declare type MemberDescription = {
|
768 | clientHost: string;
|
769 | clientId: string;
|
770 | memberId: string;
|
771 | memberAssignment: Buffer;
|
772 | memberMetadata: Buffer;
|
773 | };
|
774 | export declare type ConsumerGroupState = 'Unknown' | 'PreparingRebalance' | 'CompletingRebalance' | 'Stable' | 'Dead' | 'Empty';
|
775 | export declare type GroupDescription = {
|
776 | groupId: string;
|
777 | members: MemberDescription[];
|
778 | protocol: string;
|
779 | protocolType: string;
|
780 | state: ConsumerGroupState;
|
781 | };
|
782 | export declare type GroupDescriptions = {
|
783 | groups: GroupDescription[];
|
784 | };
|
785 | export declare type TopicPartitions = {
|
786 | topic: string;
|
787 | partitions: number[];
|
788 | };
|
789 | export declare type TopicPartition = {
|
790 | topic: string;
|
791 | partition: number;
|
792 | };
|
793 | export declare type TopicPartitionOffset = TopicPartition & {
|
794 | offset: string;
|
795 | };
|
796 | export declare type TopicPartitionOffsetAndMetadata = TopicPartitionOffset & {
|
797 | metadata?: string | null;
|
798 | };
|
799 | export declare type Batch = {
|
800 | topic: string;
|
801 | partition: number;
|
802 | highWatermark: string;
|
803 | messages: KafkaMessage[];
|
804 | isEmpty(): boolean;
|
805 | firstOffset(): string | null;
|
806 | lastOffset(): string;
|
807 | offsetLag(): string;
|
808 | offsetLagLow(): string;
|
809 | };
|
810 | export declare type GroupOverview = {
|
811 | groupId: string;
|
812 | protocolType: string;
|
813 | };
|
814 | export declare type DeleteGroupsResult = {
|
815 | groupId: string;
|
816 | errorCode?: number;
|
817 | error?: KafkaJSProtocolError;
|
818 | };
|
819 | export declare type ConsumerEvents = {
|
820 | HEARTBEAT: 'consumer.heartbeat';
|
821 | COMMIT_OFFSETS: 'consumer.commit_offsets';
|
822 | GROUP_JOIN: 'consumer.group_join';
|
823 | FETCH_START: 'consumer.fetch_start';
|
824 | FETCH: 'consumer.fetch';
|
825 | START_BATCH_PROCESS: 'consumer.start_batch_process';
|
826 | END_BATCH_PROCESS: 'consumer.end_batch_process';
|
827 | CONNECT: 'consumer.connect';
|
828 | DISCONNECT: 'consumer.disconnect';
|
829 | STOP: 'consumer.stop';
|
830 | CRASH: 'consumer.crash';
|
831 | REBALANCING: 'consumer.rebalancing';
|
832 | RECEIVED_UNSUBSCRIBED_TOPICS: 'consumer.received_unsubscribed_topics';
|
833 | REQUEST: 'consumer.network.request';
|
834 | REQUEST_TIMEOUT: 'consumer.network.request_timeout';
|
835 | REQUEST_QUEUE_SIZE: 'consumer.network.request_queue_size';
|
836 | };
|
837 | export declare type ConsumerHeartbeatEvent = InstrumentationEvent<{
|
838 | groupId: string;
|
839 | memberId: string;
|
840 | groupGenerationId: number;
|
841 | }>;
|
842 | export declare type ConsumerCommitOffsetsEvent = InstrumentationEvent<{
|
843 | groupId: string;
|
844 | memberId: string;
|
845 | groupGenerationId: number;
|
846 | topics: TopicOffsets[];
|
847 | }>;
|
848 | export interface IMemberAssignment {
|
849 | [key: string]: number[];
|
850 | }
|
851 | export declare type ConsumerGroupJoinEvent = InstrumentationEvent<{
|
852 | duration: number;
|
853 | groupId: string;
|
854 | isLeader: boolean;
|
855 | leaderId: string;
|
856 | groupProtocol: string;
|
857 | memberId: string;
|
858 | memberAssignment: IMemberAssignment;
|
859 | }>;
|
860 | export declare type ConsumerFetchStartEvent = InstrumentationEvent<{
|
861 | nodeId: number;
|
862 | }>;
|
863 | export declare type ConsumerFetchEvent = InstrumentationEvent<{
|
864 | numberOfBatches: number;
|
865 | duration: number;
|
866 | nodeId: number;
|
867 | }>;
|
868 | interface IBatchProcessEvent {
|
869 | topic: string;
|
870 | partition: number;
|
871 | highWatermark: string;
|
872 | offsetLag: string;
|
873 | offsetLagLow: string;
|
874 | batchSize: number;
|
875 | firstOffset: string;
|
876 | lastOffset: string;
|
877 | }
|
878 | export declare type ConsumerStartBatchProcessEvent = InstrumentationEvent<IBatchProcessEvent>;
|
879 | export declare type ConsumerEndBatchProcessEvent = InstrumentationEvent<IBatchProcessEvent & {
|
880 | duration: number;
|
881 | }>;
|
882 | export declare type ConsumerCrashEvent = InstrumentationEvent<{
|
883 | error: Error;
|
884 | groupId: string;
|
885 | restart: boolean;
|
886 | }>;
|
887 | export declare type ConsumerRebalancingEvent = InstrumentationEvent<{
|
888 | groupId: string;
|
889 | memberId: string;
|
890 | }>;
|
891 | export declare type ConsumerReceivedUnsubcribedTopicsEvent = InstrumentationEvent<{
|
892 | groupId: string;
|
893 | generationId: number;
|
894 | memberId: string;
|
895 | assignedTopics: string[];
|
896 | topicsSubscribed: string[];
|
897 | topicsNotSubscribed: string[];
|
898 | }>;
|
899 | export interface OffsetsByTopicPartition {
|
900 | topics: TopicOffsets[];
|
901 | }
|
902 | export interface EachMessagePayload {
|
903 | topic: string;
|
904 | partition: number;
|
905 | message: KafkaMessage;
|
906 | heartbeat(): Promise<void>;
|
907 | pause(): () => void;
|
908 | }
|
909 | export interface EachBatchPayload {
|
910 | batch: Batch;
|
911 | resolveOffset(offset: string): void;
|
912 | heartbeat(): Promise<void>;
|
913 | pause(): () => void;
|
914 | commitOffsetsIfNecessary(offsets?: Offsets): Promise<void>;
|
915 | uncommittedOffsets(): OffsetsByTopicPartition;
|
916 | isRunning(): boolean;
|
917 | isStale(): boolean;
|
918 | }
|
919 |
|
920 |
|
921 |
|
922 |
|
923 | export declare type ConsumerEachMessagePayload = EachMessagePayload;
|
924 |
|
925 |
|
926 |
|
927 |
|
928 | export declare type ConsumerEachBatchPayload = EachBatchPayload;
|
929 | export declare type EachBatchHandler = (payload: EachBatchPayload) => Promise<void>;
|
930 | export declare type EachMessageHandler = (payload: EachMessagePayload) => Promise<void>;
|
931 | export declare type ConsumerRunConfig = {
|
932 | autoCommit?: boolean;
|
933 | autoCommitInterval?: number | null;
|
934 | autoCommitThreshold?: number | null;
|
935 | eachBatchAutoResolve?: boolean;
|
936 | partitionsConsumedConcurrently?: number;
|
937 | eachBatch?: EachBatchHandler;
|
938 | eachMessage?: EachMessageHandler;
|
939 | };
|
940 |
|
941 |
|
942 |
|
943 | export declare type ConsumerSubscribeTopic = {
|
944 | topic: string | RegExp;
|
945 | fromBeginning?: boolean;
|
946 | };
|
947 | export declare type ConsumerSubscribeTopics = {
|
948 | topics: (string | RegExp)[];
|
949 | fromBeginning?: boolean;
|
950 | };
|
951 | export declare type Consumer = {
|
952 | connect(): Promise<void>;
|
953 | disconnect(): Promise<void>;
|
954 | subscribe(subscription: ConsumerSubscribeTopics | ConsumerSubscribeTopic): Promise<void>;
|
955 | stop(): Promise<void>;
|
956 | run(config?: ConsumerRunConfig): Promise<void>;
|
957 | commitOffsets(topicPartitions: Array<TopicPartitionOffsetAndMetadata>): Promise<void>;
|
958 | seek(topicPartitionOffset: TopicPartitionOffset): void;
|
959 | describeGroup(): Promise<GroupDescription>;
|
960 | pause(topics: Array<{
|
961 | topic: string;
|
962 | partitions?: number[];
|
963 | }>): void;
|
964 | paused(): TopicPartitions[];
|
965 | resume(topics: Array<{
|
966 | topic: string;
|
967 | partitions?: number[];
|
968 | }>): void;
|
969 | on(eventName: ConsumerEvents['HEARTBEAT'], listener: (event: ConsumerHeartbeatEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
970 | on(eventName: ConsumerEvents['COMMIT_OFFSETS'], listener: (event: ConsumerCommitOffsetsEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
971 | on(eventName: ConsumerEvents['GROUP_JOIN'], listener: (event: ConsumerGroupJoinEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
972 | on(eventName: ConsumerEvents['FETCH_START'], listener: (event: ConsumerFetchStartEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
973 | on(eventName: ConsumerEvents['FETCH'], listener: (event: ConsumerFetchEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
974 | on(eventName: ConsumerEvents['START_BATCH_PROCESS'], listener: (event: ConsumerStartBatchProcessEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
975 | on(eventName: ConsumerEvents['END_BATCH_PROCESS'], listener: (event: ConsumerEndBatchProcessEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
976 | on(eventName: ConsumerEvents['CONNECT'], listener: (event: ConnectEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
977 | on(eventName: ConsumerEvents['DISCONNECT'], listener: (event: DisconnectEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
978 | on(eventName: ConsumerEvents['STOP'], listener: (event: InstrumentationEvent<null>) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
979 | on(eventName: ConsumerEvents['CRASH'], listener: (event: ConsumerCrashEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
980 | on(eventName: ConsumerEvents['REBALANCING'], listener: (event: ConsumerRebalancingEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
981 | on(eventName: ConsumerEvents['RECEIVED_UNSUBSCRIBED_TOPICS'], listener: (event: ConsumerReceivedUnsubcribedTopicsEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
982 | on(eventName: ConsumerEvents['REQUEST'], listener: (event: RequestEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
983 | on(eventName: ConsumerEvents['REQUEST_TIMEOUT'], listener: (event: RequestTimeoutEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
984 | on(eventName: ConsumerEvents['REQUEST_QUEUE_SIZE'], listener: (event: RequestQueueSizeEvent) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
985 | on(eventName: ValueOf<ConsumerEvents>, listener: (event: InstrumentationEvent<any>) => void): RemoveInstrumentationEventListener<typeof eventName>;
|
986 | logger(): Logger;
|
987 | readonly events: ConsumerEvents;
|
988 | };
|
989 | export declare enum CompressionTypes {
|
990 | None = 0,
|
991 | GZIP = 1,
|
992 | Snappy = 2,
|
993 | LZ4 = 3,
|
994 | ZSTD = 4
|
995 | }
|
996 | export declare let CompressionCodecs: {
|
997 | [CompressionTypes.GZIP]: () => any;
|
998 | [CompressionTypes.Snappy]: () => any;
|
999 | [CompressionTypes.LZ4]: () => any;
|
1000 | [CompressionTypes.ZSTD]: () => any;
|
1001 | };
|
1002 | export declare class KafkaJSError extends Error {
|
1003 | readonly message: Error['message'];
|
1004 | readonly name: string;
|
1005 | readonly retriable: boolean;
|
1006 | readonly helpUrl?: string;
|
1007 | readonly cause?: Error;
|
1008 | constructor(e: Error | string, metadata?: KafkaJSErrorMetadata);
|
1009 | }
|
1010 | export declare class KafkaJSNonRetriableError extends KafkaJSError {
|
1011 | constructor(e: Error | string);
|
1012 | }
|
1013 | export declare class KafkaJSProtocolError extends KafkaJSError {
|
1014 | readonly code: number;
|
1015 | readonly type: string;
|
1016 | constructor(e: Error | string);
|
1017 | }
|
1018 | export declare class KafkaJSOffsetOutOfRange extends KafkaJSProtocolError {
|
1019 | readonly topic: string;
|
1020 | readonly partition: number;
|
1021 | constructor(e: Error | string, metadata?: KafkaJSOffsetOutOfRangeMetadata);
|
1022 | }
|
1023 | export declare class KafkaJSNumberOfRetriesExceeded extends KafkaJSNonRetriableError {
|
1024 | readonly stack: string;
|
1025 | readonly retryCount: number;
|
1026 | readonly retryTime: number;
|
1027 | constructor(e: Error | string, metadata?: KafkaJSNumberOfRetriesExceededMetadata);
|
1028 | }
|
1029 | export declare class KafkaJSConnectionError extends KafkaJSError {
|
1030 | readonly broker: string;
|
1031 | constructor(e: Error | string, metadata?: KafkaJSConnectionErrorMetadata);
|
1032 | }
|
1033 | export declare class KafkaJSRequestTimeoutError extends KafkaJSError {
|
1034 | readonly broker: string;
|
1035 | readonly correlationId: number;
|
1036 | readonly createdAt: number;
|
1037 | readonly sentAt: number;
|
1038 | readonly pendingDuration: number;
|
1039 | constructor(e: Error | string, metadata?: KafkaJSRequestTimeoutErrorMetadata);
|
1040 | }
|
1041 | export declare class KafkaJSMetadataNotLoaded extends KafkaJSError {
|
1042 | constructor();
|
1043 | }
|
1044 | export declare class KafkaJSTopicMetadataNotLoaded extends KafkaJSMetadataNotLoaded {
|
1045 | readonly topic: string;
|
1046 | constructor(e: Error | string, metadata?: KafkaJSTopicMetadataNotLoadedMetadata);
|
1047 | }
|
1048 | export declare class KafkaJSStaleTopicMetadataAssignment extends KafkaJSError {
|
1049 | readonly topic: string;
|
1050 | readonly unknownPartitions: number;
|
1051 | constructor(e: Error | string, metadata?: KafkaJSStaleTopicMetadataAssignmentMetadata);
|
1052 | }
|
1053 | export declare class KafkaJSServerDoesNotSupportApiKey extends KafkaJSNonRetriableError {
|
1054 | readonly apiKey: number;
|
1055 | readonly apiName: string;
|
1056 | constructor(e: Error | string, metadata?: KafkaJSServerDoesNotSupportApiKeyMetadata);
|
1057 | }
|
1058 | export declare class KafkaJSBrokerNotFound extends KafkaJSError {
|
1059 | constructor();
|
1060 | }
|
1061 | export declare class KafkaJSPartialMessageError extends KafkaJSError {
|
1062 | constructor();
|
1063 | }
|
1064 | export declare class KafkaJSSASLAuthenticationError extends KafkaJSError {
|
1065 | constructor();
|
1066 | }
|
1067 | export declare class KafkaJSGroupCoordinatorNotFound extends KafkaJSError {
|
1068 | constructor();
|
1069 | }
|
1070 | export declare class KafkaJSNotImplemented extends KafkaJSError {
|
1071 | constructor();
|
1072 | }
|
1073 | export declare class KafkaJSTimeout extends KafkaJSError {
|
1074 | constructor();
|
1075 | }
|
1076 | export declare class KafkaJSLockTimeout extends KafkaJSError {
|
1077 | constructor();
|
1078 | }
|
1079 | export declare class KafkaJSUnsupportedMagicByteInMessageSet extends KafkaJSError {
|
1080 | constructor();
|
1081 | }
|
1082 | export declare class KafkaJSDeleteGroupsError extends KafkaJSError {
|
1083 | readonly groups: DeleteGroupsResult[];
|
1084 | constructor(e: Error | string, groups?: KafkaJSDeleteGroupsErrorGroups[]);
|
1085 | }
|
1086 | export declare class KafkaJSDeleteTopicRecordsError extends KafkaJSError {
|
1087 | constructor(metadata: KafkaJSDeleteTopicRecordsErrorTopic);
|
1088 | }
|
1089 | export interface KafkaJSDeleteGroupsErrorGroups {
|
1090 | groupId: string;
|
1091 | errorCode: number;
|
1092 | error: KafkaJSError;
|
1093 | }
|
1094 | export interface KafkaJSDeleteTopicRecordsErrorTopic {
|
1095 | topic: string;
|
1096 | partitions: KafkaJSDeleteTopicRecordsErrorPartition[];
|
1097 | }
|
1098 | export interface KafkaJSDeleteTopicRecordsErrorPartition {
|
1099 | partition: number;
|
1100 | offset: string;
|
1101 | error: KafkaJSError;
|
1102 | }
|
1103 | export interface KafkaJSErrorMetadata {
|
1104 | retriable?: boolean;
|
1105 | topic?: string;
|
1106 | partitionId?: number;
|
1107 | metadata?: PartitionMetadata;
|
1108 | }
|
1109 | export interface KafkaJSOffsetOutOfRangeMetadata {
|
1110 | topic: string;
|
1111 | partition: number;
|
1112 | }
|
1113 | export interface KafkaJSNumberOfRetriesExceededMetadata {
|
1114 | retryCount: number;
|
1115 | retryTime: number;
|
1116 | }
|
1117 | export interface KafkaJSConnectionErrorMetadata {
|
1118 | broker?: string;
|
1119 | code?: string;
|
1120 | }
|
1121 | export interface KafkaJSRequestTimeoutErrorMetadata {
|
1122 | broker: string;
|
1123 | clientId: string;
|
1124 | correlationId: number;
|
1125 | createdAt: number;
|
1126 | sentAt: number;
|
1127 | pendingDuration: number;
|
1128 | }
|
1129 | export interface KafkaJSTopicMetadataNotLoadedMetadata {
|
1130 | topic: string;
|
1131 | }
|
1132 | export interface KafkaJSStaleTopicMetadataAssignmentMetadata {
|
1133 | topic: string;
|
1134 | unknownPartitions: PartitionMetadata[];
|
1135 | }
|
1136 | export interface KafkaJSServerDoesNotSupportApiKeyMetadata {
|
1137 | apiKey: number;
|
1138 | apiName: string;
|
1139 | }
|
1140 | export {};
|