queue-publisher-package

1.0.0 • Public • Published

Using the package in microservices:


const RabbitMQPublisher = require('queue-publisher-package');

const publisher = new RabbitMQPublisher();

async function sendMessageToQueue(queueName, message) { try { await publisher.publishToQueue(queueName, message); } catch (error) { console.error('Failed to send message to queue:', error); // Handle error } }

// Example usage: const message = { key: 'value' }; sendMessageToQueue('myQueue', message);


Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.00latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.00

Package Sidebar

Install

npm i queue-publisher-package

Weekly Downloads

0

Version

1.0.0

License

ISC

Unpacked Size

9.82 kB

Total Files

9

Last publish

Collaborators

  • nicholas.kute