apache-camelhawtio

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):

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:

Maybe there is a way? Maybe only with XML based DSL?

Here is a screenshot:

enter image description here


Solution

  • 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");