@message-queue-toolkit/kafka
Version:
Kafka adapter for message-queue-toolkit
12 lines (11 loc) • 854 B
TypeScript
import type { SupportedMessageValuesForTopic, SupportedTopics, TopicConfig } from '../types.ts';
import type { KafkaHandlerConfig } from './KafkaHandlerConfig.ts';
import type { KafkaHandlerRouting } from './KafkaHandlerRoutingBuilder.ts';
export declare class KafkaHandlerContainer<TopicsConfig extends TopicConfig[], ExecutionContext> {
private readonly handlers;
private readonly messageTypeField?;
constructor(topicHandlers: KafkaHandlerRouting<TopicsConfig, ExecutionContext>, messageTypeField?: string);
private mapTopicHandlers;
resolveHandler<Topic extends SupportedTopics<TopicsConfig>>(topic: Topic, messageValue: SupportedMessageValuesForTopic<TopicsConfig, Topic>): KafkaHandlerConfig<SupportedMessageValuesForTopic<TopicsConfig, Topic>, ExecutionContext> | undefined;
get topics(): SupportedTopics<TopicsConfig>[];
}