mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-03-15 06:56:03 +01:00
15 lines
383 B
JavaScript
15 lines
383 B
JavaScript
import { connectAmqp } from './utils/utils.js';
|
|
|
|
const connection = await connectAmqp();
|
|
const channel = await connection.createChannel();
|
|
|
|
await channel.assertQueue('send-queue-352');
|
|
|
|
channel.publish('', 'send-queue-352', Buffer.from('hello'));
|
|
|
|
console.log('Published message');
|
|
|
|
await channel.close();
|
|
await connection.close();
|
|
|
|
console.log('Successfully shut down connection');
|