Name: nsq-relayer
Owner: npm
Description: emit an event with a json payload & get it posted to nsq
Forked from: ceejbot/nsq-relayer
Created: 2018-02-16 19:06:57.0
Updated: 2018-02-16 19:06:59.0
Pushed: 2018-02-16 19:08:42.0
Size: 98
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
You emit events structured in a specific way and this tool posts them all to its configured nsq instance.
t createRelayer = require('nsq-relayer');
t relayer = createRelayer({
topic: 'foozle',
nsq: 'http://localhost:5141',
event: 'event-to-listen-for'
ater on
ess.emit('event-to-listen-for', { name: 'my-little-message', type: 'cutie-mark' });
he relayer will then post this to nsq for us with zero effort
TBD.
No attempt is made to retry failed event posts.
Each event is posted as it arrives, without batching. You might want to batch if you're posting many events per second.
ISC.