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.

Creating a new Camel Component

If you want to create your own version of the Camel Component you can use the Camel Maven Archetypes.

mvn archetype:generate                   \
  -DarchetypeGroupId=org.apache.camel.archetypes  \
  -DarchetypeArtifactId=camel-archetype-component \
  -DarchetypeVersion=2.9.0  \
  -DgroupId=myGroupId                  \

This will create a maven project which contains a demo component, you need to implements your own component by modifying it.You need to move the META-INF/services/direct file to META-INF/services/PACKAGE_NAME/FOO where FOO is the URI scheme for your component and any related endpoints created on the fly and PACKAGE_NAME is your component's package name which is replaced the '.' with '/'.

Optional properties (available as of Camel 2.9.0)

By default the camel component archetype will generate a HelloWorldComponent that will use the URI scheme helloworld. You can further customize the generated component by using some custom parameters passed to the component.






The name of the component. It will be used as a prefix for all generated classes.



The default URI scheme the component will use.

Usage Examples:

To create the "Awesome" component and all its related classes (AwesomeComponent, AwesomeEndpoint, AwesomeProducer etc) that will use the awesome URI scheme:

mvn archetype:generate                   \
  -DarchetypeGroupId=org.apache.camel.archetypes  \
  -DarchetypeArtifactId=camel-archetype-component \
  -DarchetypeVersion=2.9.0  \
  -DgroupId=myGroupId                  \
  -DartifactId=myArtifactId  \
  -Dname=Awesome             \
  -Dscheme=awsome            \

For more help see Writing Components

© 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