queuing things

This commit is contained in:
nora 2022-03-07 16:33:52 +01:00
parent 2fe3b4b77b
commit 770762b920
16 changed files with 102 additions and 13 deletions

View file

@ -3,7 +3,9 @@ import { connectAmqp } from './utils/utils.js';
const connection = await connectAmqp();
const channel = await connection.createChannel();
channel.publish('exchange-1', 'queue-1', Buffer.from('hello'));
await channel.assertQueue('send-queue-352');
channel.publish('', 'send-queue-352', Buffer.from('hello'));
console.log('Published message');