Skip to content
/ PPMQ Public

PPMQ is a lightweight Push Pull Message Queue built around Websockets.

License

Notifications You must be signed in to change notification settings

jcucuzza/PPMQ

Repository files navigation

npm

ppMQ 💬 is a lightweight Push Pull Message Queue built around websockets. In its current state, ppMQ is volatile and does not have any retention or redundency. Please take this into consideration and note that these will be improved upon in future releases.

Ease of use

ppMQ is simple, after standing up your own ppMQ broker you can make use of the client side agent.

There is only four methods you need in order to start pushing and pulling from your ppMQ broker! These are:

use

Define your clients identity, the whereabouts of your broker, as well as the topics you wish to pull from.

ppMQ.use({
    'url': 'ws://localhost:1337',
    'auth': 'ffb6bdff-30fc-4249-b4ef-15413712427a',
    'topics': [
        'logback',
        'purchase',
        'customer.info',
        'store.address'
    ]
});

connect

After establishing your use for ppMQ we can then connect to the broker and begin using it!

ppMQ.connect();

push

Send a message to any topic, even if one does not exist, and those who are subscribed will receive it!

ppMQ.push('baked-goods', 'Total items sold: 12');

pull

Pull down a message from any topic, including topics that you did not initially subscribed to, with ease!

var message = ppMQ.pull('baked-goods');
if(message){
  // do something
}

That's all there is to it ☺️

License

MIT

About

PPMQ is a lightweight Push Pull Message Queue built around Websockets.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages