davsclaus opened a new pull request, #29095:
URL: https://github.com/apache/camel/pull/29095

   Backport of CAMEL-26487 to `camel-4.22.x`, as a **different fix from main** 
(not a cherry-pick of #28863), so it needs review.
   
   On main (#28863), the endpoint URI of a `netty-http` endpoint became its 
full URI, with the endpoint options. That changes what shows up in JMX names, 
auto-mock names (`mockEndpoints("http*")` stops matching), `CamelToEndpoint`, 
tracing and metrics. That is too visible for a patch release, so on 
`camel-4.22.x` the endpoint URI stays the HTTP address and `NettyHttpEndpoint` 
instead overrides `equals`/`hashCode` with the full URI:
   
   - `NettyHttpComponent` stores the full (normalized) URI on the endpoint, in 
a field that is not a URI option.
   - `NettyHttpEndpoint.equals`/`hashCode` compare that URI and, as 
`DefaultEndpoint` does, the CamelContext name.
   - So `netty-http:http://host/foo` and 
`netty-http:http://host/foo?throwExceptionOnFailure=false` are different 
endpoints, and each gets its own producer in a `ProducerTemplate` or `toD`. 
Before, the second one used the producer of the first, with the first one's 
options.
   
   Tests: `NettyHttpEndpointDifferentOptionsTest` (from main, adapted: the 
endpoint URIs are still equal, the endpoints are not) covers identity, a 
`ProducerTemplate` with two option variants, and `toD` with an option from a 
header. Full camel-netty-http suite run locally: 300 tests, 0 failures, 10 
skipped.
   
   Upgrade guide: a 4.22.3 note (the two endpoints are distinct; the endpoint 
URI does not change; two consumers on one address that differ only in options 
are no longer rejected at startup). The same note goes into the guides on main 
in a separate PR.
   
   Replaces the bot cherry-pick #29091.
   
   _Claude Code on behalf of Claus Ibsen (davsclaus)_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to