stop route in otherwise

前端 未结 1 1563
萌比男神i
萌比男神i 2021-01-18 05:19

hi have a route like this



    
        
            

        
1条回答
  •  春和景丽
    2021-01-18 06:09

    You can add a to stop continue routing the message.

    In Java code:

    exchange.setProperty(Exchange.ROUTE_STOP, Boolean.TRUE);
    

    In Java DSL:

    .when(simple("${in.header.CamelHttpResponseCode} == 404"))
        .stop()
    .otherwise()
        ...
    

    0 讨论(0)
提交回复
热议问题