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

@modulus/rabbit-channel

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modulus/rabbit-channel

wrapper for creating a rabbitMQ connection and opening a channel

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@modulus/rabbit-channel

npm travis standard

wrapper for creating a rabbitMQ connection and opening a channel

It gets tedious to start every rabbit interaction with the same two function calls:

const Amqp = require('amqplib/callback_api')

Amqp.connect(url, options, (err, connection) => {
  if (err) throw err

  connection.createChannel((err, channel) => {
    if (err) throw err

    // ready to start actually scripting
  })
})

Additionally, using this module abstracts the dependency on amqplib (a little).

Install

npm install @modulus/rabbit-channel

Usage

The exported function takes the same parameters as amqplib.connect, and yields channel and connection objects.

const RabbitChannel = require('@modulus/rabbit-channel')

RabbitChannel(url, options, (err, channel, connection) {
  if (err) throw err

  // have 
})

Contributing

Contributions welcome! Please read the contributing guidelines first.

License

MIT

Keywords

FAQs

Package last updated on 03 Aug 2016

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