Context of the problem:
We have RabbitMQ queues, for instance, a queue named queue-sign which receives messages related to signing documents. We have a rare situation where two users might simultaneously send 25,000 contracts each for signing. I do not want the second user to wait until the first 25,000 contracts are processed. We chose RabbitMQ because we have quite heavy objects and face issues with our database. To avoid creating jobs and so on for reading, we decided to use RabbitMQ. What is the best ways to handle this. For small count of sign messages I can use priority queues, but for big I don`t want to block each other.
Am I correct in understanding that I need to dynamically create a new queue and a SimpleMessageListenerContainer dynamically, and bind the new queue to the listener container? This way, if someone wants to add large messages to large queues, I can create a new queue and add TTL (Time To Live) to the queue and process it independently? Are there any better approaches to handle this?