Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rhea

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rhea

reactive AMQP 1.0 library

  • 3.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
331K
increased by8.62%
Maintainers
1
Weekly downloads
 
Created

What is rhea?

The 'rhea' npm package is a high-level AMQP 1.0 client library for Node.js. It provides a comprehensive set of features for building messaging applications, including sending and receiving messages, managing connections, and handling various messaging patterns.

What are rhea's main functionalities?

Sending Messages

This feature allows you to send messages to an AMQP broker. The code sample demonstrates how to connect to a broker, open a sender link, and send a message.

const rhea = require('rhea');

const connection = rhea.connect({ host: 'localhost', port: 5672 });

connection.open_sender('examples');

connection.on('sendable', function (context) {
  context.sender.send({ body: 'Hello, World!' });
  connection.close();
});

Receiving Messages

This feature allows you to receive messages from an AMQP broker. The code sample demonstrates how to connect to a broker, open a receiver link, and handle incoming messages.

const rhea = require('rhea');

const connection = rhea.connect({ host: 'localhost', port: 5672 });

connection.open_receiver('examples');

connection.on('message', function (context) {
  console.log('Received message:', context.message.body);
  connection.close();
});

Managing Connections

This feature allows you to manage connections to an AMQP broker. The code sample demonstrates how to handle connection open and close events.

const rhea = require('rhea');

const connection = rhea.connect({ host: 'localhost', port: 5672 });

connection.on('connection_open', function (context) {
  console.log('Connection opened');
});

connection.on('connection_close', function (context) {
  console.log('Connection closed');
});

Other packages similar to rhea

Keywords

FAQs

Package last updated on 20 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc