Custom tags and/or namespaces are not (yet) supported by Camel (and perhaps it will never be?).
I see following different solutions to encapsulate reusable processing steps:
- Write a separate reusable route. I guess this is the simplest solution and the standard way to do it.
- Write a processor/bean/service that encapsulates the whole processing.
Include a full context into your route using the Camel context component. First, you add a Camel context to the registry:
registry.bind("accounts", myAccountContext);
Then you use the context in your route:
<from uri="accounts:invoice"/>
Write a component as described here.