Skip to content

Instantly share code, notes, and snippets.

@krizka
Created June 2, 2020 14:45
Show Gist options
  • Save krizka/c5ec1566961f54e8fe58bf7e3408427f to your computer and use it in GitHub Desktop.
Save krizka/c5ec1566961f54e8fe58bf7e3408427f to your computer and use it in GitHub Desktop.
const amqp = require('amqplib');
const login = '<login>';
const pass = '<password>';
const queue = 'queue';
async function main() {
const conn = await amqp.connect(
`amqp://${login}:${pass}@amqp.minter-service.online:5672`,
);
const channel = await conn.createChannel();
channel.consume(queue, msg => {
console.log('sent', msg);
});
}
main().then(console.log, console.error);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment