@theconduit/provider-rabbitmq
v0.1.1
Published
RabbitMQ (AMQP) transport for Conduit using amqplib: publish and consume operation envelopes with channel pooling and resilience helpers for production queues and exchanges.
Maintainers
Readme
@theconduit/provider-rabbitmq
RabbitMQ transport provider with amqplib adapters and pooled channel support.
Install
pnpm add @theconduit/provider-rabbitmqHighlights
RabbitMQProviderpublishes envelopes to exchange/routing key.AmqplibPublisherClientandPooledAmqplibPublisherClient.RabbitMQChannelPoolfor high-concurrency publish workloads.RabbitMQDLQManagerfor DLQ publishing.- Built-in resilience controls: retry, timeout, in-flight limit, circuit breaker.
Quick start
import { ConduitBuilder } from "@theconduit/core";
import {
RabbitMQProvider,
RabbitMQDLQManager,
RabbitMQChannelPool,
PooledAmqplibPublisherClient
} from "@theconduit/provider-rabbitmq";
const pool = new RabbitMQChannelPool(amqpConnection, {
size: 8,
max_pending_acquires: 256,
acquire_timeout_ms: 2_000
});
const publisher = new PooledAmqplibPublisherClient(pool);
const provider = new RabbitMQProvider(publisher, {
exchange: "conduit.operations",
publish_timeout_ms: 1_000,
max_in_flight: 2_000
});
const dlq = new RabbitMQDLQManager(publisher, {
exchange: "conduit.dlq",
routing_key: "dlq"
});
const bus = new ConduitBuilder()
.registerProvider(provider)
.withDlqManager(dlq)
.build();
// ...on shutdown
await pool.close();Exports
RabbitMQProviderRabbitMQDLQManagerAmqplibPublisherClientPooledAmqplibPublisherClientRabbitMQChannelPool
Related docs
docs/guides/transport-hardening.mddocs/guides/choosing-provider.md
