Created
June 2, 2020 14:45
-
-
Save krizka/c5ec1566961f54e8fe58bf7e3408427f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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