We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11c910b commit 9737c5aCopy full SHA for 9737c5a
1 file changed
index.d.ts
@@ -181,18 +181,7 @@ export interface TopicMetadata {
181
numPartitions: number;
182
}
183
184
-/**
185
- * A custom message router interface that can be implemented by the user.
186
- */
187
-export interface MessageRouter {
188
- /**
189
- * Choose a partition for the given message.
190
- * @param message The message to be routed.
191
- * @param topicMetadata Metadata for the topic.
192
- * @returns The partition index to send the message to.
193
194
- getPartition(message: Message, topicMetadata: TopicMetadata): number;
195
-}
+export type MessageRouter = (message: Message, topicMetadata: TopicMetadata) => number;
196
197
export interface SchemaInfo {
198
schemaType: SchemaType;
0 commit comments