redis-one-time-messenger
v0.0.1
Published
redis-one-time-message
Downloads
2
Readme
one time message base on redis
redis-one-time-message makes you can receive message through redis in a disributed environment.
Install
npm i redis-one-time-message
Usage
In your one process:
const message = new RedisOneTimeMessenger({ redisConfig })
const response = await message.waitForResponse('my-unique-channal')
// response is 'tom'
In your another process:
const message = new RedisOneTimeMessenger({ redisConfig })
message.publish('my-unique-channel', 'tom')