Hello. I am attempting to simplify my Dynamic Router EIP component by using the existing RecipientList implementation from camel-core.
I was looking at the RecipientListReifier, even though I will not be adding anything to the Camel DSL. It looks like it would be perfect for setting up the RecipientList instance. I can take my configuration class, and adapt it to a RecipientListDefinition instance. The problem that I am encountering is that the RecipientListReifier constructor wants a Route instance. When routing recipients send their subscription information to the dynamic router component through its control channel, this is not the route that the actual routing will occur on. So I have no idea what Route instance I can provide to the Reifier constructor. Furthermore, when the dynamic router receives a message, the producer simply calls the processor, so there is no real route to speak of, even during runtime dynamic routing. My questions are: 1. Is this a decent approach? After a recent code review, it occurred to me that I needed to simplify everything, and this would do that. The component would only need to manage subscriptions, and evaluate exchanges for recipients. 2. What should I use as the Route instance for the Reifier constructor? Would it be a good idea to create a RouteBuilder for each dynamic routing channel that subscribers are using? It would go from "direct:channelName" and then to the processor. That still leaves me confused about how to use my component/endpoint configuration to set the options on the RecipientList through the Reifier. It's a chicken/egg scenario: the RecipientListReifier needs the Route, and the Route needs the processor. 3. What other approach am I missing that might be better than this? Thanks, Steve