1 |
|
2 | import { ClientKafka } from '../client/client-kafka';
|
3 | import { Cluster, GroupMember, GroupMemberAssignment, GroupState } from '../external/kafka.interface';
|
4 | export declare class KafkaReplyPartitionAssigner {
|
5 | private readonly clientKafka;
|
6 | private readonly config;
|
7 | readonly name = "NestReplyPartitionAssigner";
|
8 | readonly version = 1;
|
9 | constructor(clientKafka: ClientKafka, config: {
|
10 | cluster: Cluster;
|
11 | });
|
12 | /**
|
13 | * This process can result in imbalanced assignments
|
14 | * @param {array} members array of members, e.g: [{ memberId: 'test-5f93f5a3' }]
|
15 | * @param {array} topics
|
16 | * @param {Buffer} userData
|
17 | * @returns {array} object partitions per topic per member
|
18 | */
|
19 | assign(group: {
|
20 | members: GroupMember[];
|
21 | topics: string[];
|
22 | }): Promise<GroupMemberAssignment[]>;
|
23 | protocol(subscription: {
|
24 | topics: string[];
|
25 | userData: Buffer;
|
26 | }): GroupState;
|
27 | getPreviousAssignment(): {
|
28 | [key: string]: number;
|
29 | };
|
30 | decodeMember(member: GroupMember): {
|
31 | memberId: string;
|
32 | previousAssignment: any;
|
33 | };
|
34 | }
|