Book Image

Apache Karaf Cookbook

By : Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler
Book Image

Apache Karaf Cookbook

By: Jamie Goodyear, Johan Edstorm, Achim Nierbeck, Heath J Kesler

Overview of this book

Table of Contents (17 chapters)
Apache Karaf Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Starting, stopping, suspending, and resuming routes in Karaf


Apache Camel provides users with fine-grained control of routes deployed inside a Camel Context, and as such, has provided Karaf with access to these controls. These management facilities are separate from OSGi's life cycle model, allowing users to select small portions of the Camel code that is currently being executed to start, stop, suspend, and resume operations.

Getting ready

Follow the instructions in the Listing Camel Contexts in Karaf recipe's Getting ready section for this recipe.

How to do it…

Managing Camel routes in Karaf is easy, and requires you to become familiar with four commands, which are as follows:

  • camel:route-start routeName: This command is used to start a route

  • camel:route-stop routeName: This command is used to stop a route

  • camel:route-suspend routeName: This command is used to suspend a route

  • camel:route-resume routeName: This command is used to resume a suspended route

To make these commands clear, let's review...