primer cambio

This commit is contained in:
beseira13
2026-01-19 12:12:38 -03:00
parent 5f59dba52d
commit 44990f015a
4759 changed files with 588702 additions and 0 deletions

26
node_modules/amqplib/examples/tutorials/receive.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env node
const amqp = require('amqplib');
const queue = 'hello';
(async () => {
try {
const connection = await amqp.connect('amqp://localhost');
const channel = await connection.createChannel();
process.once('SIGINT', async () => {
await channel.close();
await connection.close();
});
await channel.assertQueue(queue, { durable: false });
await channel.consume(queue, (message) => {
console.log(" [x] Received '%s'", message.content.toString());
}, { noAck: true });
console.log(' [*] Waiting for messages. To exit press CTRL+C');
} catch (err) {
console.warn(err);
}
})();