Class Debouncer

Constructors

Properties

inputQueueUrl: string
messageMapper: MessageMapper
outputQueueUrl: string
sqs: SQSClient

Methods

  • Use this consumer to start processing messages on your input queue. Example:

    const consumer = debouncer.createInputConsumer();
    consumer.start()

    Returns Consumer

  • Call this method at the rate you wish to debounce events. Example:

    // Runs every hour at the start of the hour
    cron.schedule("0 * * * *", async () => {
    // Push out all deduped messages received so far
    debouncer.dispatchStoredMessages();
    });

    Returns Promise<void>