import type { ChannelContract } from "../../contracts"; import type { ChannelOptions, ChannelStats, MessageHandler, PublishOptions, RequestOptions, ResponseHandler, SubscribeOptions, Subscription } from "../../types"; /** * RabbitMQ Channel Implementation * * Wraps a RabbitMQ queue/exchange with a unified API. * * @template TPayload - The typed payload */ export declare class RabbitMQChannel implements ChannelContract { readonly name: string; readonly options: ChannelOptions; private readonly amqpChannel; private readonly subscriptions; private asserted; /** * Create a new RabbitMQ channel */ constructor(name: string, amqpChannel: any, options?: ChannelOptions); /** * Assert the queue exists */ assert(): Promise; /** * Publish a message */ publish(payload: TPayload, options?: PublishOptions): Promise; /** * Publish multiple messages */ publishBatch(messages: TPayload[], options?: PublishOptions): Promise; /** * Subscribe to messages * * Smart auto-ack behavior (when autoAck is not true): * - If handler completes successfully without explicit ack/nack/reject → auto-ack * - If handler throws an error → auto-nack (with retry if configured) * - If handler explicitly calls ack/nack/reject → respects that call */ subscribe(handler: MessageHandler, options?: SubscribeOptions): Promise; /** * Unsubscribe by consumer ID */ unsubscribeById(consumerId: string): Promise; /** * Stop consuming messages on this channel. * Cancels all active subscriptions gracefully. */ stopConsuming(): Promise; /** * Send message to dead-letter queue */ private sendToDeadLetter; /** * Request-response pattern */ request(payload: TPayload, options?: RequestOptions): Promise; /** * Register response handler for RPC */ respond(handler: ResponseHandler): Promise; /** * Get queue statistics */ stats(): Promise; /** * Purge all messages */ purge(): Promise; /** * Check if queue exists */ exists(): Promise; /** * Delete the queue */ delete(): Promise; } //# sourceMappingURL=rabbitmq-channel.d.ts.map