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
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.

Openshift Component

Available as of Camel 2.14

The openshift component is a component for managing your OpenShift applications. 

Maven users will need to add the following dependency to their pom.xml for this component:

    <!-- use the same version as your Camel core version -->

URI format


You can append query options to the URI in the following format, ?option=value&option=value&...



Default Value




Domain name. If not specified then the default domain is used.



Mandatory: The username to login to openshift server.



Mandatory: The password for login to openshift server.



Url to the openshift server. If not specified then the default value from the local openshift configuration file ~/.openshift/express.conf is used. And if that fails as well then "" is used.



Consumer only: How frequent to poll for state changes for the applications. By default we poll every 10 seconds.



Producer only: The operation to perform which can be: list, start, stop, restart, and state. The list operation returns information about all the applications in json format. The state operation returns the state such as: started, stopped etc. The other operations does not return any value.

From Camel 2.16: getStandaloneCartridge, getEmbeddedCartridges, addEmbeddedCartridge, removeEmbeddedCartridge

The getStandaloneCartridge return the display name of the standalone cartridge. The getEmbeddedCartridges returns the list of the installed embedded cartridge. The addEmbeddedCartridge operation adds the latest version of an embeddable cartridge by specifying its name with the interface IEmbeddableCartridge in the header CamelOpenShiftEmbeddedCartridgeName and return the cartridge display name. The removeEmbeddedCartridge operation remove an embedded cartridge by specifying its name with the interface IEmbeddableCartridge in the header CamelOpenShiftEmbeddedCartridgeName and return the cartridge display name.



Producer only: The application name to start, stop, restart, or get the state.



Producer only: Whether to output the message body as a pojo or json. For pojo the message is a List<com.openshift.client.IApplication> type.


Listing all applications

// sending route

In this case the information about all the applications is returned as pojo. If you want a json response, then set mode=json.

Stopping an application

// stopping the foobar application

In the example above we stop the application named foobar.


Polling for gear state changes

The consumer is used for polling state changes in gears. Such as when a new gear is added/removed/ or its lifecycle is changed, eg started, or stopped etc.

// trigger when state changes on our gears
    .log("Event ${header.CamelOpenShiftEventType} on application ${} changed state to ${header.CamelOpenShiftEventNewState}");


When the consumer emits an Exchange then the body contains the com.openshift.client.IApplication as the message body. And the following headers is included.

HeaderMay be nullDescription
CamelOpenShiftEventTypeNoThe type of the event which can be one of: added, removed or changed.
CamelOpenShiftEventOldStateYesThe old state, when the event type is changed.
CamelOpenShiftEventNewStateNoThe new state, for any of the event types



© 2004-2015 The Apache Software Foundation.
Apache Camel, Camel, Apache, the Apache feather logo, and the Apache Camel project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.
Graphic Design By Hiram