Apache camel Endpoint schemes duplication

Viewed 51

in apache camel, we have endpoints associated with scheme strings like "cxf", "ahc", "http" and the likes. What happens if there are two components built using the same scheme? I don't see a validation from camel framework which prevents the deployment of components with duplicate schemes. Should there be a validation in the first place or this is by design?

Regards Gopal

I have a need to re-use available camel components from the community but change the endpoint scheme to make it unique. For example I want to use amqp component but in my blueprint route i would like to have unique scheme used "<camel from uri="mydomain-amqp">. This way I can re-use the amqp as a new component but also keep others using the amqp as is.

1 Answers

Camel prevents adding a component using a name/scheme that already exists. Adding your component under a different name would be something like this:

getContext().addComponent("mydomain-amqp", new AMQPComponent());
Related