Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
/ nsq-relayer Public archive
forked from ceejbot/nsq-relayer

emit an event with a json payload & get it posted to nsq

License

Notifications You must be signed in to change notification settings

npm/nsq-relayer

 
 

Repository files navigation

nsq-relayer

You emit events structured in a specific way and this tool publishes them all to its configured nsq instance.

const createRelayer = require('nsq-relayer');

const relayer = createRelayer({
	topic: 'foozle',
	nsq: 'nsq://localhost:4150',
	event: 'event-to-listen-for'
});

// later on
process.emit('event-to-listen-for', { name: 'my-little-message', type: 'cutie-mark' });
// the relayer will then publish this to nsq for us with zero effort

Configuration

TBD.

Notes

No attempt is made to retry failed publishes.

Each event is published as it arrives, without batching. You might want to batch if you're publishing many events per second.

Licence

ISC.

About

emit an event with a json payload & get it posted to nsq

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 100.0%