Peter Nowak created CAMEL-20109:
-----------------------------------
Summary: Endpoints with special characters (especially '#' like in
spring-redis when specifying a redisTemplate)) can't be removed anymore with
context.removeEndpoint
Key: CAMEL-20109
URL: https://issues.apache.org/jira/browse/CAMEL-20109
Project: Camel
Issue Type: Bug
Components: camel-core, camel-spring-redis, core
Affects Versions: 4.0.2
Reporter: Peter Nowak
Attachments: patch.diff
The [changes|https://github.com/apache/camel/pull/11723/files] from [issue
19987|https://issues.apache.org/jira/browse/CAMEL-19987] to optimize endpoint
matching also updated the logic how the AbstractCamelContext removes a single
endpoint ("removeEndpoint" method) which now breaks the removal of endpoints
containing "#" symbols (maybe even more special chars) like used in the
"spring-redis component" when specifying a redistemplate bean in the uri.
I do not have a fix (except that the old code calling "removeEndpoints"
worked), but i attached 2 unit test cases for "camel-spring-redis" which show
the problem.
With 4.0.1 they are green, with 4.0.2 they fail because the endpoint containing
the "#" (which is normalized and url escaped to "%23") does not get removed.
Please revert the changes made for 4.0.2 or fix it in some other way. As shown
it also happens when trying to remove such a route, that not all endpoints get
cleared up causing a potential memory leak if you create and remove routes
dynamically during runtime or also has maybe other side effects
--
This message was sent by Atlassian Jira
(v8.20.10#820010)