Neologistic Paraphasic Mumbling
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    pigeon-postpublic

    pigeon

    Configuration based RabbitMQ interface based on node-amqp

    Installation

    npm install pigeon-post
    

    Synopsis

    An example of connecting to a server, publishing an event and receiving it

    Configuration file

    publishers:
      -
        name: greeter
        options:
          type: fanout
        publishes:
          - greeting
    subscribers
      -
        name: receptionist
        bindings:
          greeter:
            - greeting

    Publisher

    var Pigeon = require('pigeon').getInstance();
     
    Pigeon
        .connect('config.yml')
        .publish('greeting', {value:'Hello World'})

    Subscriber

    var Pigeon = require('pigeon').getInstance();
     
    Pigeon
        .connect('config.yml')
        .subscribe('receptionist', function(msg) {
            console.log(msg);
        });

    Keywords

    none

    install

    npm i pigeon-post

    Downloadsweekly downloads

    18

    version

    0.0.8

    license

    none

    last publish

    collaborators

    • avatar