But sometimes you want to do things in an order but the order isn’t know because it hasn’t arrived (new request or websocket message).
In comes a super simple tool called kue.
Here is a tutorial.
This allowed me to use a utility class along with a reversed controller that could accept messages, filter them out and then queue them to be saved to a database. This was required because some messages were updates to previous updates, with out build a super large container with its own comparison system, this allowed the queues to be processed in order, the promises to “.then” handle when the job was done and trigger that so that the next job could be processed.