0.0.2 • Published 1 year ago

@plainmq/plainmqlib v0.0.2

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
1 year ago

PlainMQLib JS

Intro

PlainMQ is a simple broadcast only messaging queue which runs off a server. This library helps to connect to that server in a simple manner in order to send and receive messages using your favourite language, NodeJS.

Features

  • Fast, plain and simple
  • Any messaging pattern is possible to implement on the client side
  • Open source
  • Easy programming interface to get started on (see below)

Simple Example

const PlainMQ = require("@plainmq/plainmqlib");

PlainMQ.setup("127.0.0.1", 13000);

PlainMQ.onReceiveBytes(receiveMsgBytes);
PlainMQ.onReceiveStr(receiveMsgStr);

PlainMQ.sendStr("{'json': true}");
PlainMQ.sendBytes([0x17, 0x12, 0x57]);

function receiveMsgBytes(inBytes) {
	console.log("received bytes:", inBytes.toString());
}

function receiveMsgStr(inStr) {
	console.log("received string", inStr);
}

Contact & Collab

Reach out via Github on the main organization or any sub-project.