10331f908d1d8a668c229d6e85654c7f8a6de0 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"3037173export 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' })),
);
}),
);
};export const sendQueueMessage = ({ message, env }: SendQueueMessage) => {
return env.PROCESS_QUEUE.send(message, { contentType: 'json' });
}; 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));10331f908d1d8a668c229d6e85654c7f