PubSub-Q
PubSub-Q helps you to receive, send, reply and manage retry messages. The underlying framework for sending messages is the Google Cloud PubSub Service.
Features!
- Listener for a pull-subscription
- Send messages to a specified topic
- Send reply to a previously received message, by adding the original messageID
- Receiving and identifying a reply message for a previously published message
ToDos
- More Documentation
- Testing Scenarios
- More precise Catching/Error Throwing
Installation
https://www.npmjs.com/package/node-pubsub-q
npm i node-pubsub-q
Contribution
https://github.com/AndreyBulezyuk/node-pubsub-q
Usage
const pubsubHelper = require; pubsubHelper.init;
Message Listener
// Receives Pull Messages from Pub/SubpubsubHelper.listener;
Send Message
try{ let messageId = await pubsubHelper.sendMessage } catch
Send Reply Message
try{ let messageId = await pubsubHelper.sendReply } catch