Code Monkey home page Code Monkey logo

ppmq's Introduction

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

ppmq's People

Contributors

dependabot[bot] avatar jcucuzza avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.