[
https://issues.apache.org/jira/browse/CAMEL-7778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151604#comment-18151604
]
Claus Ibsen commented on CAMEL-7778:
------------------------------------
Camel already supports this. When an endpoint URI has no scheme,
`CamelContext.getEndpoint` looks the name up in the
registry as an `Endpoint` (see `AbstractCamelContext`), so `to("myChannel")` or
`template.send("myChannel", ...)` uses
the endpoint bound with `context.getRegistry().bind("myChannel",
context.getEndpoint("seda:x?concurrentConsumers=8"))`.
`Registry.bind` works with every registry, including Spring, and
`ref:myChannel` and `@BindToRegistry` do the same.
Closing as done.
_Claude Code on behalf of davsclaus_
> EndpointRegistry in camel-core that allows refer endpoints using and logical
> id, like you can do in spring
> ----------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-7778
> URL: https://issues.apache.org/jira/browse/CAMEL-7778
> Project: Camel
> Issue Type: New Feature
> Components: camel-core
> Affects Versions: 2.12.0
> Reporter: Serge Smertin
> Priority: Major
>
> Generally, it's more efficient/loosely coupled to send to endpoint aliases,
> so we might change implementation of endpoint without changing the code:
> {code}
> // in cases of dynamic routing
> producer.asyncSend("specificMessageChannel", new Processor() {
> ...
> });
> {code}
> It's possible to do it through Spring DSL, but impossible to register
> endpoints from route builder if we use spring. Also it is easier to configure
> number of consumers and etc for endpoints.
> {code}
> <endpoint id="specificMessageChannel"
> uri="seda:internalProcessing?concurrentConsumers=8" />
> {code}
> JndiRegistry has "bind" method and ApplicationContextAwareRegistry does not
> have it.
> Another use-case for that is camel-test component
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)