@nwire/bus-amqp
v0.9.2
Published
Nwire — RabbitMQ-backed EventBus adapter. Topic exchange pub/sub with optional durable queues — same EventBus contract as @nwire/bus-nats.
Readme
@nwire/bus-amqp
RabbitMQ-backed EventBus adapter — experimental in 0.9.x.
import { amqpBus } from "@nwire/bus-amqp";
const bus = await amqpBus({
url: process.env.AMQP_URL ?? "amqp://localhost",
exchange: "nwire.events",
});
await bus.publish({
eventName: "orders.order-was-placed",
payload: { orderId: "o1" },
envelope: seedEnvelope({ tenant: "acme" }),
});Integration tests run with RUN_INTEGRATION=1 against a local RabbitMQ
(docker-compose service rabbitmq).
See @nwire/bus-nats for the production-ready JetStream adapter; AMQP
lands as a scaffold for teams already on RabbitMQ.
