The changes from issue 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