SQS Consumer
    Preparing search index...

    Interface Events

    These are the events that the consumer emits. Each event will receive QueueMetadata as the last argument, which is added automatically by the emitter.

    consumer.on('message_received', (message, metadata) => {
    console.log(`Received message from queue: ${metadata.queueUrl}`);
    console.log(message);
    });
    interface Events {
        aborted: [];
        empty: [];
        error: [Error, Message | Message[]];
        message_processed: [Message];
        message_received: [Message];
        option_updated: [UpdatableOptions, number];
        processing_error: [Error, Message];
        response_processed: [];
        started: [];
        stopped: [];
        timeout_error: [Error, Message];
        waiting_for_polling_to_complete: [];
        waiting_for_polling_to_complete_timeout_exceeded: [];
    }
    Index

    Properties

    aborted: []

    Fired when requests to SQS were aborted.

    empty: []

    Fired when the queue is empty (All messages have been consumed).

    error: [Error, Message | Message[]]

    Fired when an error occurs interacting with the queue.

    If the error correlates to a message, that message is included in Params

    message_processed: [Message]

    Fired when a message is successfully processed and removed from the queue.

    message_received: [Message]

    Fired when a message is received.

    option_updated: [UpdatableOptions, number]

    Fired when an option is updated

    processing_error: [Error, Message]

    Fired when an error occurs processing the message.

    response_processed: []

    Fired after one batch of items (up to batchSize) has been successfully processed.

    started: []

    Fired when the consumer starts its work..

    stopped: []

    Fired when the consumer finally stops its work.

    timeout_error: [Error, Message]

    Fired when handleMessageTimeout is supplied as an option and if handleMessage times out.

    waiting_for_polling_to_complete: []

    Fired when the Consumer is waiting for polling to complete before stopping.

    waiting_for_polling_to_complete_timeout_exceeded: []

    Fired when the Consumer has waited for polling to complete and is stopping due to a timeout.