I need to create a processor that takes a single message and results in two separate messages with unique headers for each message. My plan is to use the headers to dynamically route each result message to the appropriate JMS queue.
I want to be able to use this processor in a route configured via Spring. I was trying to do this with a bean implementation, but it looks like beans can only send the same message to multiple destinations with the @RecipientList annotation. Is there something I can use that I missed? I've been digging through the code of MulticastProcessor and Splitter to figure out how these work. It looks like the only way I can accomplish what I want is to subclass MulticastProcessor so I can create two ProcessorExchangePairs, each with the same destination processor (like Splitter) but then I can create unique messages and headers for each exchange. But I don't think I can use a subclass of MulticastProcessor in my Spring configuration, it needs to destination processor as a constructor argument. Is there some other approach I'm not seeing?
