Claus Ibsen created CAMEL-27711:
-----------------------------------

             Summary: camel-ref: query options break the registry lookup, 
consumer options have no effect
                 Key: CAMEL-27711
                 URL: https://issues.apache.org/jira/browse/CAMEL-27711
             Project: Camel
          Issue Type: Bug
            Reporter: Claus Ibsen
             Fix For: 4.24.0


Found while improving the option descriptions of camel-ref for CAMEL-23832 
(commit 
https://github.com/apache/camel/commit/f8f194bb916e0873103ae63f9be2c85e020f4182).
These are separate problems of the component; the descriptions commit only 
documents the current behavior.

h4. 1. Query options become part of the registry name
{{RefComponent.createEndpoint(uri, remaining, parameters)}} takes the name from 
the full {{uri}} (everything after the first {{:}}, without a leading {{//}}), 
not from {{remaining}}. The {{uri}} still holds the query string. So 
{{ref:foo?lazyStartProducer=true}} gets the name 
{{foo?lazyStartProducer=true}}, and {{RefEndpoint.doInit()}} fails with a 
{{NoSuchBeanException}}, although {{lazyStartProducer}} is a documented option 
of the endpoint. Only a ref URI without options works.
Proposed change: use {{remaining}} (without a leading {{//}}) as the name, and 
add a test with an option in the URI.

h4. 2. The consumer options of the ref endpoint have no effect
{{RefEndpoint.createConsumer(processor)}} returns 
{{endpoint.createConsumer(processor)}} of the endpoint found in the registry. 
That consumer is configured from, and creates exchanges with, the found 
endpoint. The {{bridgeErrorHandler}}, {{exceptionHandler}} and 
{{exchangePattern}} options set on the ref endpoint are documented but never 
reach the consumer.
Proposed change: apply these options to the delegated consumer, or document 
that they must be set on the endpoint in the registry.

_Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to