rabbitmq-enterprise-toolkit
Version:
🚀 Enterprise-grade RabbitMQ wrapper for Node.js & TypeScript - High-throughput messaging with automatic retry, DLQ, batch processing & graceful shutdown. Production-ready AMQP client with zero message loss guarantee.
23 lines • 874 B
TypeScript
import { Channel } from 'amqplib';
import { PublishOptions, PublisherQueueOptions } from '../types';
export declare class Publisher {
private getChannel;
private publishBuffer;
private batchTimer;
private readonly BATCH_SIZE;
private readonly BATCH_TIMEOUT;
private assertedQueues;
constructor(getChannel: () => Channel);
publish(queueName: string, data: any, options?: PublishOptions): Promise<void>;
private batchPublish;
private flushBatch;
private immediatePublish;
assertQueue(options: PublisherQueueOptions): Promise<void>;
checkQueue(queueName: string): Promise<{
messageCount: number;
consumerCount: number;
}>;
publishToExchange(exchange: string, routingKey: string, data: any, options?: PublishOptions): Promise<void>;
flush(): Promise<void>;
}
//# sourceMappingURL=publisher.d.ts.map