Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated the camel karaf page to provided documentation for the new commands

...

Camel provides a ready to use config.properties file that you can download:

http://svn.apache.org/repos/asf/camel/tags/camel-2.7.2/platforms/karaf/features/src/main/resources/config.propertiesImage Removed

This file has to be copied into Karaf etc folder.

...

Code Block
karaf@root> features:list|grep -i camel
[uninstalled] [2.8.0          ] camel                         repo-0                 
[uninstalled] [2.8.0          ] camel-core                    repo-0                 
[uninstalled] [2.8.0          ] camel-spring                  repo-0                 
[uninstalled] [2.8.0          ] camel-blueprint               repo-0                 
[uninstalled] [2.8.0          ] camel-test                    repo-0                 
[uninstalled] [2.8.0          ] camel-cxf                     repo-0                 
[uninstalled] [2.8.0          ] camel-cache                   repo-0                 
[uninstalled] [2.8.0          ] camel-castor                  repo-0                 
[uninstalled] [2.8.0          ] camel-crypto                  repo-0                 
[uninstalled] [2.8.0          ] camel-http                    repo-0                 
[uninstalled] [2.8.0          ] camel-http4                   repo-0                 
[uninstalled] [2.8.0          ] camel-mina                    repo-0                 
[uninstalled] [2.8.0          ] camel-jetty                   repo-0                 
[uninstalled] [2.8.0          ] camel-servlet                 repo-0                 
[uninstalled] [2.8.0          ] camel-jms                     repo-0                 
...

To install Camel, just install the camel feature:

...

When you install the camel feature, new Karaf commands become available automatically.

Command

Description

camel:list-contexts

Lists the camel contexts available in the current Karaf instance

camel:list-routes

Displays the list of Camel routes available in the current Karaf instance

camel:info-context

Displays detail information about a given Camel context

camel:start-context

Starts the given Camel context

camel:stop-context

Stops the given Camel context

camel:info-route

Provides detail information about a Camel route

camel:show-route

Renders the route in XML

camel:start-route

Starts the given route.

camel:stop-route

Stops the given route.

camel:suspend-route

Suspends the given route. Available on Camel 2.9.0 or newer

camel:resume:route

Resumes the given route. Available on Camel 2.9.0 or newer

camel:list-contexts

The *camel:list-contexts* command displays the list of CamelContext available in the current Karaf instance:

Code Block
karaf@root> camel:list-contexts 
Name                 Status               Uptime              
[66-camel-3        ] [Started           ] [14.559 seconds    ]

...

Code Block
karaf@root> camel:list-routes 
[route1              ]

You can also filter the routes by CamelContext:

Code Block
karaf@root> camel:list-routes 66-camel-3 
[route1              ]

Tip: use the TAB key to completion on the CamelContext ID.

...

Code Block
karaf@root> camel:info-context 66-camel-3 
Camel Context 66-camel-3
        Name: 66-camel-3
        Version: 2.8.0
        Status: Started
        Uptime: 1 minute

Advanced
        Auto Startup: true
        Starting Routes: false
        Suspended: false
        Tracing: false

Properties

Components
        timer
        properties
        log

Endpoints
        timer://test
        log://test

Routes
        route1

Used Languages

...

Code Block
karaf@root> camel:info-route route1 
Camel Route route1
        Camel Context: 66-camel-3

Properties
                id = route1
                parent = 2e7aacc1

Statistics
        Exchanges Total: 98
        Exchanges Completed: 98
        Exchanges Failed: 0
        Min Processing Time: 1ms
        Max Processing Time: 2ms
        Mean Processing Time: 1ms
        Total Processing Time: 134ms
        Last Processing Time: 1ms
        First Exchange Date: 2011-06-29 07:21:57
        Last Exchange Completed Date: 2011-06-29 07:23:34

Definition
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route id="route1" xmlns="http://camel.apache.org/schema/spring">
    <from uri="timer:test"/>
    <to uri="log:test" id="to1"/>
</route>

...

Code Block
karaf@root> camel:show-route route1 
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<route id="route1" xmlns="http://camel.apache.org/schema/spring">
    <from uri="timer:test"/>
    <to uri="log:test" id="to1"/>
</route>

...

Code Block
karaf@root> camel:stop-route route1

Camel 2.9 or newer:

camel:suspend-route

The *camel:start-route* command suspends a Camel route:

Code Block

karaf@root> camel:suspend-route route1

Tip: use TAB key for completion on the route name.

camel:resume-route

The *camel:resume-route* command resume a Camel route:

Code Block

karaf@root> camel:resume-route route1

Tip: use TAB key for completion on the route name.