This examples branch specially created to provide minimal code examples
of @imqueue/pg-pubsub usage. Currently there are the following different
scenario usage examples available:
- Multi-process Listener. All processes listening everything and emitting messages.
- Filtered Listener. All processes listening everything and emitting messages, but during listening self-emitted messages are skipped from handling.
- Single-process Listener. All processes emitting messages to the channel, but only one process at a time is listening to that channel.
git clone -b examples git://github.com/imqueue/pg-pubsub.git examples
cd examples
npm iNow you can start any of them, for example:
./node_modules/.bin/ts-node filtered.ts