Hi, Claus. I am going with your suggestion to create a separate endpoint for the control channel. I am having a little trouble being able to create the endpoint for the control channel. Camel is complaining that "No endpoint could be found for: dynamic-router-control://, please check your classpath contains the needed Camel component jar." How can I define two schemes?
Thanks, Steve On Tue, Jan 18, 2022 at 3:00 AM Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > No this is not really how an endpoint is designed. Each endpoint is > responsible for creating its consumer/producers. > However a consumer / producer may use some shared entity, such as seda > does with its queues. > > Maybe what you are trying is to shoe-horn everything into the same > endpoint. > > For your dynamic router component, maybe you have one endpoint for the > control channel and another for the dynamic router, where they have > different name > > dynamic-router:name > dynamic-router-control:name/action/param > > However coming back to using one endpoint. Then I dont think it makes > sense for a control channel message to be able to create a consumer > Then you can just in case someone attempts to use it wrongly throw an > exception in createConsumer > > dynamic-router:control/subscribe/123?filter=${body} contains 'red' > > from dynamic-router:123 > to bean:reds > > > > > On Mon, Jan 17, 2022 at 7:37 PM Steve973 <steve...@gmail.com> wrote: > > > > I have added path params to the URI for certain conditions of my > > component. The normal use case would have a URI like: > > my-component://name. Now there is another use case where I can specify a > > URI like: my-component://name/<action>/param. In this case, "action" can > > have different values. But I only want to add a consumer for the name > > (once), even if multiple URIs are used where the name is the same, but > the > > action is different. In the component class, in the createEndpoint() > > method, I can make sure that I instantiate the Endpoint with the URI > > truncated after the name, but it still results in an attempt to add > another > > consumer if an endpoint has been previously created for that name (with a > > different action). Is there a way to stop creating new Endpoints for > > different path parameters, and only care about the base URI? > > > > Thanks, > > Steve > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >