Skip to content

Commit

Permalink
chore(): remove method deprecated kafka
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony133 committed Apr 11, 2023
1 parent 6868a80 commit 77ead27
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion packages/microservices/external/kafka.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ export type LegacyPartitioner = ICustomPartitioner;
export let Partitioners: {
DefaultPartitioner: DefaultPartitioner;
LegacyPartitioner: LegacyPartitioner;
/**
* @deprecated Use DefaultPartitioner instead
*
* The JavaCompatiblePartitioner was renamed DefaultPartitioner
* and made to be the default in 2.0.0.
*/
JavaCompatiblePartitioner: DefaultPartitioner;
};

export type PartitionMetadata = {
Expand Down Expand Up @@ -1024,6 +1031,13 @@ export type ConsumerRunConfig = {
eachMessage?: EachMessageHandler;
};

/**
* @deprecated Replaced by ConsumerSubscribeTopics
*/
export type ConsumerSubscribeTopic = {
topic: string | RegExp;
fromBeginning?: boolean;
};
export type ConsumerSubscribeTopics = {
topics: (string | RegExp)[];
fromBeginning?: boolean;
Expand All @@ -1032,7 +1046,9 @@ export type ConsumerSubscribeTopics = {
export type Consumer = {
connect(): Promise<void>;
disconnect(): Promise<void>;
subscribe(subscription: ConsumerSubscribeTopics): Promise<void>;
subscribe(
subscription: ConsumerSubscribeTopics | ConsumerSubscribeTopic,
): Promise<void>;
stop(): Promise<void>;
run(config?: ConsumerRunConfig): Promise<void>;
commitOffsets(
Expand Down

0 comments on commit 77ead27

Please sign in to comment.