Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20109

Endpoints with special characters (especially '#' like in spring-redis when specifying a redisTemplate)) can't be removed anymore with context.removeEndpoint

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 4.0.2
    • 4.0.3, 4.3.0
    • camel-core
    • None
    • Unknown
    • Regression

    Description

      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

      Attachments

        1. patch.diff
          4 kB
          Peter Nowak

        Activity

          People

            davsclaus Claus Ibsen
            nukulami Peter Nowak
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: