Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Karaf Support Apache Camel is designed to work nicely inside Apache Karaf OSGi container. It includes:
It is recommended to use at least Apache Karaf 4.x with current Camel versions.
Install Camel in KarafAssuming that you have a running Karaf instance, you can register the Camel features descriptor: karaf@root> feature:repo-add camel 2.18.4 Now, we have all Camel features available: 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 ... It is a good start to at least install camel-blueprint karaf@root> features:install camel-blueprint You might need other features depending on what components you use in your routes. So for example if you use stream:out then you need the camel-stream feature. karaf@root> features:install camel-stream Karaf commandsThe camel commands below help managing your integrations. In many cases the commands support tab completion for context and route names.
camel:route-listkaraf@root> camel:route-list [route1 ] You can also filter the routes by CamelContext: karaf@root> camel:route-list 66-camel-3 [route1 ] Tip: use the TAB key to completion on the CamelContext ID. camel:context-infoDisplays detailed information about a given CamelContext: add the *--verbose* option (following the context name) to also list the endpoints karaf@root> camel:context-info 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 You can see the current Camel version used by the CamelContext, some context attributes, the components involved in the context, and the endpoints defined. Tip: use TAB key for completion on the CamelContext name. camel:route-infoThe *camel:route-info* command provides detail information about a Camel route: karaf@root> camel:route-info 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> You can see some statistics (the number of processed exchanges, the processing time, etc) and a XML rendering of your route (whatever DSL used to define the route). Tip: use TAB key for completion on the route name. camel:route-showThe *camel:route-show* command renders the route in XML. It's independent from the DSL used to define the route: karaf@root> camel:route-show 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> Tip: use TAB key for completion on the route name. camel:route-suspendThe *camel:route-suspend* command suspends a Camel route: karaf@root> camel:route-suspend route1 Tip: use TAB key for completion on the route name. camel:route-resumeThe *camel:route-resume* command resume a Camel route: karaf@root> camel:route-resume route1 Tip: use TAB key for completion on the route name. camel:endpoint-listThe *camel:endpoint-list* command displays the list of the endpoints available in all camel contexts of the current Karaf instance: karaf@root> camel:endpoint-list camel-id uri Status [test ] [timer://test ] [Started ] [test ] [direct://A ] [Started ] It displays the context name/ID (used in others commands), the URI of the endpoint and the current status (started/stopped).
|