How to use the sqs-consumer.prototype function in sqs-consumer

To help you get started, we’ve selected a few sqs-consumer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github finanzcheck / sqs-insight / lib / QueueMessageDispatcher.js View on Github external
module.exports = QueueMessageDispatcher;

var Consumer = require('sqs-consumer'),
    AWS = require('aws-sdk'),
    Q = require('q');

/**
 * We need to override the parent method, to prevent the consumer of deleting the message.
 *
 * @param message
 * @param cb
 * @private
 */
Consumer.prototype._deleteMessage = function (message, cb) {
    cb();
};

/**
 * QueueMessageDispatcher is the chain element between the queue and the event dispatcher. It provides a small
 * set of functions to interact with the queue and register for queue messages.
 *
 * @param eventEmitter
 * @constructor
 */
function QueueMessageDispatcher(eventEmitter) {
    this.eventEmitter = eventEmitter;
    this.consumer = {};
    this.endpoints = {};
}

sqs-consumer

Build SQS-based Node applications without the boilerplate

Apache-2.0
Latest version published 16 days ago

Package Health Score

92 / 100
Full package analysis