Auto-discovery is a mechanism that enables you to dynamically add components to your
FUSE Mediation Router application. The component URI prefix is used as a key to load components on
demand. For example, if FUSE Mediation Router encounters the endpoint URI, activemq://MyQName,
and the ActiveMQ endpoint is not yet loaded, FUSE Mediation Router searches for the component
identified by the activemq prefix and dynamically loads the component.
Before configuring auto-discovery, you must ensure that your custom component classes are accessible from your current classpath. Typically, you bundle the custom component classes into a JAR file, and add the JAR file to your classpath.
To enable auto-discovery of your component, create a Java properties file named after
the component prefix, component-prefix, and store that file in the
following location:
/META-INF/services/org/apache/camel/component/component-prefixThe component-prefix properties file must contain the
following property setting:
class=component-class-nameWhere component-class-name is the fully-qualified name of
your custom component class. You can also define additional system property settings in
this file.
For example, you can enable auto-discovery for the FUSE Mediation Router FTP component by creating the following Java properties file:
/META-INF/services/org/apache/camel/component/ftp
Which contains the following Java property setting:
class=org.apache.camel.component.file.remote.RemoteFileComponent
![]() | Note |
|---|---|
The Java properties file for the FTP component is already defined in the JAR file,
|