diff --git a/packages/functions/src/aggregator/handle-buffer-queue-message.js b/packages/functions/src/aggregator/handle-buffer-queue-message.js index 79f752c..cd8ac87 100644 --- a/packages/functions/src/aggregator/handle-buffer-queue-message.js +++ b/packages/functions/src/aggregator/handle-buffer-queue-message.js @@ -24,6 +24,15 @@ Sentry.AWSLambda.init({ * @param {import('aws-lambda').SQSEvent} sqsEvent */ async function handleBufferQueueMessage (sqsEvent) { + // if one we should put back in queue + if (sqsEvent.Records.length === 1) { + return { + batchItemFailures: sqsEvent.Records.map(r => ({ + itemIdentifier: r.messageId + })) + } + } + // unexpected number of records if (sqsEvent.Records.length !== 2) { return {