In general, the practice depends on the specific task, but the queue option for each user is definitely not relevant to the Rabbitmq theme, and if you use it, then you do something wrong, the message queue is not created for such structures. Messages in fact should always be more than queues.
For example, we need to provide fast and efficient multi-threaded video processing uploaded by users. To do this, we create a queue with the name video_processing and publish processing tasks there.
- The user went to the site and uploaded the video, sent a message to the queue.
- Consumer saw this task and blocked it for the duration of the execution.
- Consumer began to process the task
- Consumer completed the task, wrote a report somewhere
- Consumer removed the task from the queue, thus saying that it completed successfully
- Received your converted video
In this scenario, the consummer could crash (the server rebooted), and the rebbit would easily give the task to another concierge for execution, and therefore the performance of your queue depends only on the number of workers who perform tasks from the queue. And also you could throw this message into another queue and continue processing it using other algorithms.
The queue server is mainly used for tasks related to
- Data processing
- Process management
- Integration and interoperability
Basically, they make one queue for a specific task (for example, the queue for sending letters to users), how to determine how many queues you need, again depends on your task.