I'm trying to solve a problem where the main reason is that I need to split a big message, into small messages before sending it to RabbitMQ (can't change that).
But doing this, creates another problem: The consumer of this message is in a Kubernetes deployment with 2 replicas of the pod. But the messages created in the split CANT'T be processed in both of them (it would create a huge problem).
So, the question is: how can I make sure that only one of the pods will be consuming the messages??
My first idea was to create a queue only for this case, and put an env variable with it's routing key in only one of the pods. But seems like it is kinda anti-pattern, so I'm trying to avoid this approach.