Was sitting at like 250k that were just sitting there, so I uh programatically ack'd them all
Was sitting at like 250k that were just sitting there, so I uh programatically ack'd them all
8a6de0 or 89a515 89a515eb79...Service Temporarily Unavailable coming as an exception directly from sendBatch chunk here is lodash's chunk function, to break messages into groupsPromise.all p-map (https://github.com/sindresorhus/p-map) might help to keep the concurrency level down - you can only have 6 simultaneous connections open.send or sendBatch counts as one) . An invocation is each call to queue or fetch.fetch that is finalised at the end of the queue() handlerfetch, then all the requests within the queue invocation must be < 1000, or else the log message would never make itQueue send failed: Service Temporarily Unavailablesend(“foo”)

"Queue send failed: Service Temporarily Unavailable"30371738a6de089a51589a515eb79...Service Temporarily Unavailableexport const sendBatchQueueMessage = ({
batch,
env,
}: SendBatchQueueMessage) => {
const ch = chunk(batch, 80);
return Promise.all(
ch.map((c) => {
return env.PROCESS_QUEUE.sendBatch(
c.map((body) => ({ body: body.message, contentType: 'json' })),
);
}),
);
};chunklodashPromise.allp-mapexport const sendQueueMessage = ({ message, env }: SendQueueMessage) => {
return env.PROCESS_QUEUE.send(message, { contentType: 'json' });
};queuequeuequeue()return handleMessages(batch, { ...env, logger }).finally(() =>
tracer.finalizeQueueEvent({ batch }),
);Queue send failed: Service Temporarily Unavailable "Queue sendBatch failed: Service Temporarily Unavailablesend(“foo”) env.logger.info('Sending foo');
env.PROCESS_QUEUE.send('FOO')
.then(() => env.logger.info('sent foo'))
.catch((e) => env.logger.error('failed to send foo', e)); "Queue send failed: Service Temporarily Unavailable"3037173