import { ClientProxy } from '@nestjs/microservices'; import { OnModuleInit, OnModuleDestroy } from '@nestjs/common'; import { TransportServicePort } from '../../domain/ports/transport.ports'; export declare class KafkaAdapter implements TransportServicePort, OnModuleInit, OnModuleDestroy { private readonly client; private readonly logger; constructor(client: ClientProxy); /** * Lifecycle hook triggered when the module is initialized. * Establishes a connection to the Kafka client. */ onModuleInit(): Promise; /** * Emits an event to the Kafka broker with the given data. * Logs success or handles errors gracefully without throwing. * * @param event - The name of the event to emit. * @param data - The payload to send with the event. */ emit(event: string, data: T): Promise; /** * Connects the Kafka client and logs a success message. */ private connect; /** * Closes the Kafka client connection. */ private disconnect; /** * Lifecycle hook triggered when the module is destroyed. * Gracefully disconnects the Kafka client. */ onModuleDestroy(): Promise; } //# sourceMappingURL=kafka.adapter.d.ts.map