Skip to content
This repository was archived by the owner on Apr 3, 2024. It is now read-only.
npmPublic archive

About

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

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Latest commit

 

History

25 Commits

Folders and files

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

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages