Socket
Book a DemoInstallSign in
Socket

@jackrabbit/channel

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jackrabbit/channel

wrapper for creating a rabbitMQ connection and opening a channel

2.0.0
latest
Source
npmnpm
Version published
Weekly downloads
26
420%
Maintainers
2
Weekly downloads
 
Created
Source

@jackrabbit/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 @jackrabbit/channel

Usage

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

const RabbitChannel = require('@jackrabbit/channel')

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

  // script away
})

Contributing

Contributions welcome! Please read the contributing guidelines first.

License

MIT

Keywords

channel

FAQs

Package last updated on 28 Jul 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.