qb-messageq
Usage
messageq is a simple, reliable Redis-backed task queue based pub/sub messaging system based on relyq. It is based on a pub/sub model and an example follows.
npm install qb-messageq --save
qb start // Access a channel using messageq and qb's `contact` polymethod // Listen for messages on this channel // Or you can directly invoke a service queue ; // Or you can create an aliasqb // And lastly, you can publish on channels ;
Options:
discovery_prefix: 'my-soa-discovery'
(required) - Redis key prefix for the discovery service. This must be same across all messageq instances that want to talk to each other.ttl: 5000
(default: 5s (in ms)) - Time to live between cached subscriber requests. Use a large one for long-term subscribers.
Note: The messageq dialect will use the same redis server as the qb framework for task queuing.
License
MIT in LICENSE file