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

@twilson63/palmetto-rmq

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@twilson63/palmetto-rmq

This module uses rabbitMQ as the pub/sub messaging component for palmetto flow applications

  • 1.0.5
  • npm
  • Socket score

Version published
Weekly downloads
64
increased by3100%
Maintainers
1
Weekly downloads
 
Created
Source

Palmetto RMQ

This module uses rabbitMQ as the pub/sub messaging component for palmetto flow applications

Build Status

usage

configure

var io = require('@twilson63/palmetto-rmq')({
  endpoint: 'amqp://guest:guest@localhost:5672',
  app: '<appname>',
  vhost: '<optional>'
})

subscribe

io.on('foobar', function (msg) {
  console.log(msg)
})

publish

io.emit('send', msg)

common patterns

frontend component query

var uuid = uuid.v4()
io.on(uuid, function (event) {
  console.log(event.object)
})
io.emit('send', {
  to: 'widget.all.request',
  from: uuid,
  subject: 'widget',
  verb: 'all',
  type: 'request',
  object: {}
})

backend service

io.on('widget.all.request', function (event) {
  // do work
  var results = ...

  io.emit('send', {
    to: event.from,
    subject: 'widget',
    verb: 'all',
    type: 'response',
    object: results
  })
})

The service listens to the widget.all.request svc then uses the from node to publish the response to.

FAQs

Package last updated on 02 Jun 2015

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