This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new ecdc5d7  Update how-can-i-stop-a-route-from-a-route.adoc (#6370)
ecdc5d7 is described below

commit ecdc5d7d2ec376f45fb1e71ad35e0a4766b3424b
Author: dk2k <[email protected]>
AuthorDate: Tue Nov 2 22:11:58 2021 +0300

    Update how-can-i-stop-a-route-from-a-route.adoc (#6370)
    
    Hi guys,
    This article looks outdated.
    line 151 contains: exchange.getContext().stopRoute("myRoute");
    Meanwhile there is no method stopRoute(String) in 
org.apache.camel.CamelContext
    I suggest this call instead^
    exchange.getContext().getRouteController().stopRoute("myRoute");
---
 .../modules/faq/pages/how-can-i-stop-a-route-from-a-route.adoc          | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/docs/user-manual/modules/faq/pages/how-can-i-stop-a-route-from-a-route.adoc 
b/docs/user-manual/modules/faq/pages/how-can-i-stop-a-route-from-a-route.adoc
index 2e4bcb5..5e62d2b 100644
--- 
a/docs/user-manual/modules/faq/pages/how-can-i-stop-a-route-from-a-route.adoc
+++ 
b/docs/user-manual/modules/faq/pages/how-can-i-stop-a-route-from-a-route.adoc
@@ -148,7 +148,7 @@ public RouteBuilder createMyRoutes() throws Exception {
                                 @Override
                                 public void run() {
                                     try {
-                                        
exchange.getContext().stopRoute("myRoute");
+                                        
exchange.getContext().getRouteController().stopRoute("myRoute");
                                     } catch (Exception e) {
                                         // ignore
                                     }

Reply via email to