[
https://issues.apache.org/jira/browse/CAMEL-26463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137906#comment-18137906
]
Claus Ibsen commented on CAMEL-26463:
-------------------------------------
Merged via https://github.com/apache/camel/pull/29125 (commit
527f6dea5f68c14660ca96fd1a2251c7d1adea26).
_Claude Code on behalf of davsclaus_
> camel-undertow - removing a plain consumer that never started unregisters the
> path of a running consumer of the same path
> -------------------------------------------------------------------------------------------------------------------------
>
> Key: CAMEL-26463
> URL: https://issues.apache.org/jira/browse/CAMEL-26463
> Project: Camel
> Issue Type: Bug
> Components: camel-undertow
> Reporter: shashank
> Assignee: shashank
> Priority: Minor
> Fix For: 4.24.0
>
>
> Follow-up of CAMEL-26460 (path templates next to a static path), named in its
> review; the same on main.
> {{UndertowConsumer.doStop}} always unregisters its path from the host, and
> {{BaseService.stop()}} runs {{doStop()}} also for a consumer that never
> started (a route with {{autoStartup=false}} that is removed, or a consumer
> whose start failed). The path handlers count the registrations per path and
> method ({{CamelMethodHandler}}), so such a consumer decrements the count of
> another, running consumer of the same path:
> * route {{a}} runs {{undertow:http://0.0.0.0:8080/dup}}, route {{b}} consumes
> the same path with {{autoStartup(false)}} and is removed: the handler of
> {{a}} goes, and when these were the only paths of the server,
> {{DefaultUndertowHost}} stops the server: {{a}} still runs and its requests
> get "connection refused";
> * a path template {{/orders/\{id\}}} and a static {{/orders}} running, a
> second, never started {{/orders}} route removed: {{/orders}} then reaches the
> template route.
> CAMEL-26083 fixed the same pairing for rest-dsl consumers only
> ({{RestRootHandler}} registers and unregisters the rest path only when the
> consumer was added or removed).
> *Proposal*
> {{UndertowConsumer}} unregisters only what it registered (remember the
> registration made in {{doStart}}, clear it in {{doStop}}), as for the
> rest-dsl consumers. Tests: the two cases above, and a consumer whose start
> failed.
> _Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)