RabbitMQ is a reliable and mature messaging and streaming broker, which is easy to deploy on cloud environments, on-premises, and on your local machine. It is currently used by millions worldwide.
Go to siteimport amqp from "amqplib";
export default defineComponent({
props: {
rabbitmq: {
type: "app",
app: "rabbitmq",
}
},
async run({ steps, $ }) {
const url = `amqp://${this.rabbitmq.$auth.username}:${this.rabbitmq.$auth.password}@${this.rabbitmq.$auth.host}:${this.rabbitmq.$auth.port}`;
const connection = await amqp.connect(url);
const channel = await connection.createChannel();
const queue = 'Sample Queue';
await channel.assertQueue(queue, { durable: true });
const message = 'Welcome RabbitMQ + Pipedream users! ' + new Date().toISOString()
channel.sendToQueue(queue, Buffer.from(message), { persistent: true });
console.log(`Sent: ${message}`);
const queueInfo = await channel.checkQueue(queue);
return queueInfo;
},
})
RabbitMQ uses API keys for authentication. When you connect your RabbitMQ account, Pipedream securely stores the keys so you can easily authenticate to RabbitMQ APIs in both code and no-code steps.
Setting up RabbitMQ requires their users enter their RabbitMQ settings host, post, username, and password in order to connect. For more info, refer to RabbitMQ’s documentation