New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rx-amqplib

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rx-amqplib

RxJS wrapper for the amqplib from squaremo

latest
Source
npmnpm
Version
0.1.6
Version published
Maintainers
1
Created
Source

RxJS wrapper for amqplib

rx-amqplib is a wrapper for using the squaremo amqplib NodeJS package with RxJS.

Gettings started

To include this library in your project, all you need to do is install it using NPM.

$ npm install rx-amqplib --save

Examples

Here is a basic example of creating a connection to a RabbitMQ server, creating a channel + queue and sneding a message to the queue.

const config = {
  queue: 'test_queue',
  host: 'amqp://localhost'
};

// Process stream
RxAmqpLib.newConnection(config.host)
  .flatMap(connection => connection
    .createChannel()
    .flatMap(channel => channel.assertQueue(config.queue, { durable: false }))
    .doOnNext(reply => reply.channel.sendToQueue(config.queue, new Buffer('Test message')))
    .flatMap(reply => reply.channel.close())
    .flatMap(() => connection.close())
  )
  .subscribe(() => console.log('Message sent'));

More Examples

  • Hello World

    Server, Client

    The simplest thing that does something.

  • Work Queues

    New task, Worker

    Distributing tasks among workers

  • Publish/Subscribe

    Emit logs, Receive logs

    Sending messages to many consumers at once

  • Routing

    Emit log, Receive logs

    Receiving messages selectively

  • Topics

    Emit log, Receive logs

    Receiving messages based on a pattern

  • RPC

    RPC Server, RPC Client

    Remote procedure call implementation

Build it Yourself

Should you wish to build the library yourself, either for personal use, or for contribution, please ensure there are no errors emitted during the build process with npm run build.

$ git clone git@github.com:SkippyZA/rx-amqplib.git
$ cd rx-amqplib
$ npm install
$ npm run build

Keywords

rxjs

FAQs

Package last updated on 24 Oct 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