'How to set route node properties?
While monitoring an Apache Camel application with hawt.io, I noticed that the nodes of a camel route have some properties that I cannot influence with the Java DSL, but which are displayed in hawt.io. It would be pretty awesome if you could define them anyway.
I am particularly interested in the id and the description of a node in the route. My route currently looks something like this (screenshot below):
- My route
- rabbitmq://tso11
- log4
- process4
- to3
- process5
- to4
The displayed names (log4, process4, process5, ...) are automatically generated "id" properties. There is also an always empty property "description".
It would be awesome if I could change this somehow for a much better readable route:
- My route
- rabbitmq://tso11
- log incoming message
- process for header extraction
- to xslt processor additional-mappint.xslt
- process for conversion to nms42 format
- to nms42 endpoint
Maybe there is a way? Maybe only with XML based DSL?
Here is a screenshot:
Solution 1:[1]
In Java DSL, you can set the id of a node thanks to the method id(String id).
In the next example, the id of the endpoint mock:bar has been set to bar:
from("direct:start")
.to("mock:foo")
.to("mock:bar").id("bar")
.to("mock:result");
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |

