New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pmb

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pmb

An object pattern based message broker.

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
13
-13.33%
Maintainers
1
Weekly downloads
 
Created
Source

pmb

A simple object pattern based message broker.

Usage as Standalone Server

npm install pmb
pmb

Usage as a Required Server

var pmb = require('pmb').server({ // Optional config object
	ip: '0.0.0.0',
	port: 6789,
	tls: false,
    timeout : 60000
});
pmb.server		// Server object
pmb.patterns	// Topics and their pattern matchers

Usage as Client

var pmb = require('pattern-message-broker').client({ // Optional config object
	ip: '0.0.0.0',
	port: 6789,
	tls: false,
    timeout : 60000,
});

// Connect to the server and start requesting messages with the given pattern in the given topics
//	Pattern (Object, Optional, Defaults to an empty object)
//		An object expressing required properties to be matched.
//		property: '*' denotes that the property only must exist.
//	Topic (String or Array, Optional, Defaults to: 'default')
//		Topic or topics to receive messages from.
//	Processor (Function. required)
//		
pmb.receive({cmd:'test'}, 'default', function(meta, data){

});

Keywords

message

FAQs

Package last updated on 02 Mar 2016

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