You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Emmerson (Jira)" <ji...@apache.org> on 2020/04/22 15:53:00 UTC

[jira] [Reopened] (CAMEL-14944) Rest routes can not be suspended using controlbus

     [ https://issues.apache.org/jira/browse/CAMEL-14944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmerson reopened CAMEL-14944:
------------------------------

Sorry,

The component work when I do stop or restart, but not when I use "*suspend*".

 

Working calls

.toD("controlbus:route?routeId=${exchangeProperty.route-id}&action=stop")
 .toD("controlbus:route?routeId=${exchangeProperty.route-id}&action=restart&restartDelay=10000")

 

NOT Working calls

.toD("controlbus:route?routeId=${exchangeProperty.route-id}&action=suspend")

> Rest routes can not be suspended using controlbus
> -------------------------------------------------
>
>                 Key: CAMEL-14944
>                 URL: https://issues.apache.org/jira/browse/CAMEL-14944
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-restlet, camel-undertow
>    Affects Versions: 3.1.0, 3.2.0
>         Environment: java version "1.8.0_181"
> Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
>            Reporter: Emmerson
>            Priority: Major
>
> Hello,
> I am defining a REST route with route identifier "mngt-endpoint-stats"
> {code:java}
> restConfiguration().component("undertow")
> .bindingMode(RestBindingMode.json)
> .contextPath("/").host("0.0.0.0").port(9090)
> .apiContextPath("/api-doc")
> .apiContextRouteId("api-doc-endpoint")
> .apiProperty("api.title", "Producer API")
> .apiProperty("api.version", "1.0.0")
> .apiProperty("cors", "true");
> rest("/mngt").id("mngt-endpoint")
>  .consumes("application/json").produces("application/json")
>  .get("/stats").id("mngt-endpoint-stats").description("Stats Apache Camel")
>  .to(StatsRouteBuilder.DIRECT_STATS){code}
>  
> I want to suspend/resume the route dynamically due schedule maintenance periods or return 503 along that time.
>  
> I am trying to use the controlbus to suspend the route but after call it the endpoint is still available and working.
>  
> {code:java}
> .toD("controlbus:route?routeId=${exchangeProperty.routesIds[${exchangeProperty.CamelLoopIndex}]}&action=suspend");{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)