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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@idsa/platform

v2.0.2

Published

Microservice cluster client based on gRPC and rabbitMQ

Readme

Microservice cluster client

  ___ ___  ___   _     ___ _      _    __               
 |_ _|   \/ __| /_\   | _ \ |__ _| |_ / _|___ _ _ _ __  
  | || |) \__ \/ _ \  |  _/ / _` |  _|  _/ _ \ '_| '  \ 
 |___|___/|___/_/ \_\ |_| |_\__,_|\__|_| \___/_| |_|_|_|

Install

To install, use npm.

npm install -S @idsa/platform

You can use flow-typed - add in .flowconfig

[libs]
node_modules/@idsa/platform/flow-typed

Add in your code:

import platform from '@idsa/platform';
const app = platform({
  bases: process.env.BASES || 'tcp://app1.idsa.vpn:39000,app1.idsa.vpn:39001',
  amqp: process.env.AMQP || 'amqp://rabbit1.idsa.vpn:5672',
});

// Here you have to call app.expose

app.connect()
  .then(() => console.log('Started!'));

Expose method into the cluster

app.expose({ role: 'math', cmd: 'sum' }, (msg) => {
  return { answer: msg.left + msg.right };
  // Or return Promise
});

Call method

app.request({ role: 'math', cmd: 'sum' }, { left: 1, right: 2 })
  .then(result => console.log(result.answer));
}

Send event to the Message Bus

app.publish('info.hello', { message: 'Hello world' })
  .then(() => console.log('ok'));

Consume events

For multiple worker instances - Every message will be delivered exactly once.

app.consume('info.*', (routingKey, msg) => {
  console.log(msg);
  return Promise.resolve();
});

Consume events for BFF

For multiple worker instances - It creates personal queue for each instance. Every message will be delivered to each of the instances. Queue will be destroyed when instance stopped.

app.consumeExclusive('info.*', (routingKey, msg) => {
  console.log(msg);
  return Promise.resolve();
});

API reference

See Typescript Library Definition