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

servicebus

Package Overview
Dependencies
Maintainers
2
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

servicebus - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

1

bus/rabbitmq/bus.js

@@ -15,2 +15,3 @@ var amqp = require('amqp'),

options.url = options.url || process.env.RABBITMQ_URL || 'amqp://localhost';
options.vhost = options.vhost || process.env.RABBITMQ_VHOST || '/';

@@ -17,0 +18,0 @@ this.delayOnStartup = options.delayOnStartup || 10;

2

package.json

@@ -9,3 +9,3 @@ {

"description": "Simple service bus for sending events between processes using amqp.",
"version": "0.2.3",
"version": "0.2.4",
"homepage": "https://github.com/mateodelnorte/servicebus",

@@ -12,0 +12,0 @@ "repository": {

@@ -32,2 +32,4 @@ # servicebus

(Note: message acking requires use of the retry() middleware, referenced below below)
Servicebus integrates with RabbitMQ's message acknowledement functionality, which causes messages to queue instead of sending until the listening processes marks any previously received message as acknowledged or rejected. Messages can be acknowledged or rejected with the following syntax. To use ack and reject, it must be specified when defining the listening function:

@@ -61,3 +63,16 @@

}, 1000);
# Topic Routing
To use topic routing to accept multiple events in a single handler, use publish and subscribe and the following syntax:
```
bus.publish('event.one', { event: 'one' });
bus.publish('event.two', { event: 'two' });
```
and for the listener...
```
bus.subscribe('event.*', function (msg) ...
```
# Middleware

@@ -64,0 +79,0 @@

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