kafka-ts
Version:
**KafkaTS** is a Apache Kafka client library for Node.js. It provides both a low-level API for communicating directly with the Apache Kafka cluster and high-level APIs for publishing and subscribing to Kafka topics.
52 lines (51 loc) • 1.46 kB
TypeScript
type ProduceRequest = {
transactionalId: string | null;
acks: number;
timeoutMs: number;
topicData: {
name: string;
partitionData: {
index: number;
baseOffset: bigint;
partitionLeaderEpoch: number;
attributes: number;
lastOffsetDelta: number;
baseTimestamp: bigint;
maxTimestamp: bigint;
producerId: bigint;
producerEpoch: number;
baseSequence: number;
records: {
attributes: number;
timestampDelta: bigint;
offsetDelta: number;
key: string | null;
value: string | null;
headers: {
key: string;
value: string;
}[];
}[];
}[];
}[];
};
type ProduceResponse = {
responses: {
name: string;
partitionResponses: {
index: number;
errorCode: number;
baseOffset: bigint;
logAppendTime: bigint;
logStartOffset: bigint;
recordErrors: {
batchIndex: number;
batchIndexErrorMessage: string | null;
}[];
errorMessage: string | null;
}[];
}[];
throttleTimeMs: number;
};
export declare const PRODUCE: import("../utils/api.js").Api<ProduceRequest, ProduceResponse>;
export {};