npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

service-connect

v1.0.10

Published

A simple, easy to use asynchronous messaging framework for Node.JS. It provides a interface for using common asynchronous messaging patterns over different protocols. It currently supports AMQP and has been tested on RabbitMQ. The plan is to support mo

Downloads

63

Readme

Service-Connect

A simple, easy to use asynchronous messaging framework for Node.JS. It provides a interface for using common asynchronous messaging patterns over different protocols. It currently supports AMQP and has been tested on RabbitMQ. The plan is to support more protocols in the future.

Current Features

  • Messaging Patterns
    • Point to Point (Sending commands)
    • Publish/Subscribe (Publishing events)
    • Request Reply (RPC)
    • Scatter Gather (Publish event and receive multiple replies)
  • Retries
  • Auditing
  • Error handling
  • SSL Support
  • Priority Queues

Todo

  • Documentation
  • Messaging Patterns
    • Process Manager
    • Recipient List
    • Routing Slip
    • Message Aggregation
    • Content based routing
    • Message expiration
    • Aggregator
    • Streaming
  • Filters

Building

npm test

Simple example

In this example we simply send a message from one endpoint and consume the same message on another endpoint. See Point To Point sample application for a complete example.

1. Send message

First we create the Bus passing in the config. See Settings file for a complete list of all settings. After the connected callback is called we send a message using bus.send('ServiceConnect.Samples.Consumer', "ConsumerCommand", { data: count }); were the first arg is the endpoint we are sending to, the second is the message type and the third is the message.

var Bus = require('../../index.js').Bus;

var bus = new Bus({
    amqpSettings: {
        queue: { name: 'ServiceConnect.Samples.Sender' }
    }
});

bus.init(function(){
    bus.send('ServiceConnect.Samples.Consumer', "ConsumerCommand", { data: count });
});
2. Receive message

Again, we create the bus. This time however we add a message handler by using bus.addHandler("ConsumerCommand", function(message, headers) {}); were the first arg is the message type to consume and the second is the callback function.

var Bus = require('../../index.js').Bus;

var bus = new Bus({
    amqpSettings: {
        queue: {  name: 'ServiceConnect.Samples.Consumer'  }
    }
});

bus.init(function(){

    bus.addHandler("ConsumerCommand", function(message, headers) {
        console.log(message);
    });

});