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.
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:
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'
]
});
After establishing your use for ppMQ we can then connect to the broker and begin using it!
ppMQ.connect();
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 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
MIT