Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

coconspirators

Package Overview
Dependencies
Maintainers
9
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coconspirators

RabbitMQ Message Bus Library for TypeScript

  • 6.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
9
Weekly downloads
 
Created
Source

coconspirators

Codacy Badge Codacy Badge Build Status npm version

coconspirators is a microservice framework for RabbitMQ written in TypeScript. Under the hood it uses amqp.node, the battle-tested AMQP client, to communicate with RabbitMQ and has best-practices baked in. Features include:

  • Simple API for subscribing, publish and replying
  • DI Friendly
  • TypeScript First

Install

npm i coconspirators --S

Building

npm run build

Usage

import { Queue, AmqpQueue, AmqpClient  } from 'coconspirators';

export class AmqpServer {
  connection: Promise<any>;
  constructor(public client: AmqpClient, logger: Logger) {
    this.connection = this.client.connect();

    client.on('connected', () => console.log('connected!'));
    client.on('disconnected', () => console.log('disconnected!'));
  }
}

interface ZooMessage {
  animal: string;
}

@Queue({
  name: 'health'
  contentType: 'application/json'
})
export class HealthQueue extends AmqpQueue<ZooMessage> {
  constructor(client: AmqpClient) { super(client); }
}

export class HealthChecker {
  constructor(queue: HealthQueue) {
    this.queue.publish({ hi: true });
    this.queue.subscribe((message: ZooMessage) => {
      console.log('message', message);
    })
  }
}

Credits

coconspirators is a Swimlane open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.

Keywords

FAQs

Package last updated on 25 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc