No description
Find a file
2018-07-17 13:07:27 -04:00
examples Rename 2018-04-04 10:05:15 -04:00
src Make subscribe into a template (#1) 2018-05-01 12:53:54 -04:00
tests Make subscribe into a template (#1) 2018-05-01 12:53:54 -04:00
.gitignore Rename 2018-04-04 10:05:15 -04:00
cittadino.nimble Add susbcriber names 2018-04-06 17:01:18 -04:00
README.md Create README.md 2018-07-17 13:07:27 -04:00

cittadino

cittadino is a simple, small library that implements a pubsub system over STOMP.

It exposes a single main object type, PubSub, with its constructor, newPubSub(), which provides two main procs: publishModelEvent() and subscribe(). These procedures take care of publishing and subscribing, respectively. Subscriber procedures can be registered with subscribe() to certain AMQP/STOMP-style topic patterns, and arbitrary JSON messages can be sent to routing keys with publishModelEvent().

In order process incoming events, call run() inside of a process. That process will loop and block, waiting for incoming messages. Any topics that match the patterns that were registered with subscribe() will have their messages passed to the handler procedures.

See the docs for more information.