@message-queue-toolkit/kafka
Version:
Kafka adapter for message-queue-toolkit
10 lines (9 loc) • 679 B
TypeScript
import type { Message } from '@platformatic/kafka';
import type { ZodSchema } from 'zod/v4';
import type { RequestContext } from '../types.js';
export type KafkaHandler<MessageValue extends object, ExecutionContext> = (message: Message<string, MessageValue, string, string>, context: ExecutionContext, requestContext: RequestContext) => Promise<void> | void;
export declare class KafkaHandlerConfig<MessageValue extends object, ExecutionContext> {
readonly schema: ZodSchema<MessageValue, any>;
readonly handler: KafkaHandler<MessageValue, ExecutionContext>;
constructor(schema: ZodSchema<MessageValue, any>, handler: KafkaHandler<MessageValue, ExecutionContext>);
}