It seems there's lots of ways to create a task queue where something like a round-robin algo rotate tasks between consumers, but say I have a user queue, and I want to both send a welcome mail and do another task when a user is pushed to this queue, how do I do this with multiple (Node/C#/...) instances listening on the queue? How do I make sure only one mail-consumer and one other-thing-consumer processes the new user? It would be nice to have many consumers running in case one of the others goes offline and for load balancing.Two solutions come to mind:Create two seperate mail and other-thing task queues. Solves the problem until I need to attach a third consumer.Combine everything in same consumer function that's listening for users. Not very composable. Unless, of course, I turn it into an event in my consumer that other functions can react on. That'll be a problem if it makes sense to write a particular consumer in another language.
Message queues: Cluster of send mail and analytics consumers, ensure dispatch to only one mail-consumer and only one analytics-consumer
message queue;cluster