I have Java code as following to receive messages form a queue, process it and write processed message to another queue.
@RabbitListener(queues = "rawFusion")
@SendTo("Fusion")
public String receiverFusion(Object _message) {
String message = getMessage(_message);
return messageParser.parse(message);
}
Here i always get messages from "rawFusion" queue and write it into "Fusion" queue.
The thing I want to do is, writing messages different queues depending on some conditions. So i would like decide @SendTo
parameter (or maybe without using @SendTo
) after i receive message from the "RawFusion" queue.
Any idea how to do that?
Thanks in advance