Example 1
Example 1
import { Queue } from "@anabranch/queue"; import { createRabbitMQ } from "@anabranch/queue-rabbitmq"; const connector = createRabbitMQ({ connection: "amqp://localhost:5672", prefix: "my-app", queues: { notifications: { maxAttempts: 3, deadLetterQueue: "notifications-dlq" }, }, }); const queue = await Queue.connect(connector).run(); await queue.send("notifications", { userId: 123, type: "email" }).run();