‚̧Nihilistic Party Mantra
    Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    @modulus/rabbit-channel

    1.0.0¬†‚Äʬ†Public¬†‚Äʬ†Published

    @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

    Install

    npm i @modulus/rabbit-channel

    DownloadsWeekly Downloads

    0

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar
    • avatar