I'm working on improving the response time for one of our API routes.
We make a couple of requests to post messages to a message queue, and currently we await
the network request.
const someMiddlewareFunction = async (ctx, next) => {
...
await postThingToQueue(message_payload)
...
ctx.body = {...}
return next()
}
What would be the downsides of not await
ing the postThingToQueue
function if we don't care if the message was sent to the queue? (let's just say we really don't care and the proper error handling was taken care of)