'Apache Camel and hawt.io debugging: Body/Header not visible at breakpoint

I'm currently working with Apache Camel and hawt.io for monitoring and debugging my Camel routes. This works wonderfully, even if some important information is somewhat hidden in the documentation. For example, it took me a bit to turn on debugging.

However, if I set a breakpoint where the message processing stops at that point in the route, I can't see any "body" or "headers" of my Camel exchange at that point. I've tried all sorts of settings:

  • tracing / backlog tracing enabled on CamelContext
  • tracing / backlog tracing enabled on route
  • Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".

Tracing on the "Trace" tab works very well: If I activate tracing in the "Trace" tab, I can see the flow of my message through all nodes of the route.

Only when stopping at the breakpoint is the body and header not displayed.


Edited: After some changes concerning other aspects (like assigning an ID to most of the route nodes) debugging works including display of body and headers. I have no clue what changed to make it work.

And at the same time my application property "camel.main.debugging=true" failed on startup

Error binding property (camel.main.debugging=true) with name: debugging on bean: org.apache.camel.main.MainConfigurationProperties

I had to enabled debugging at the context like this:

getContext().setDebugging(true);

Here is some information:

  • I don't use any special framework: Plain old Java with a Main method in which I start Camel-Main.
  • Apache Camel: 3.14.1
  • Jolokai Agent: 1.7.1
  • hawt.io: 2.14.5
  • Exchange body type: DOMSource

One of my routes:

getCamelContext().setBacklogTracing(true);

from(rabbitMqFactory.queueConnect("tso11", "tso11-to-nms", "username"))
  .routeGroup("Workflow")
  .routeId("Workflow-to-NMS|Map-TSO11-to-NMS42")
  .routeDescription("Mapping of TSO11 Message to NMS42")
  .convertBodyTo(DOMSource.class)
  .log("Message for '$simple{header:tenant}' received")
  .process(tso11ToNmsMappingProcessor)
  .to("xslt:xslt/tso11-to-nms42.xslt")
  .to("direct:send");

And here are my current properties:

camel.main.name=TSO11
camel.main.jmxEnabled=true
camel.main.debugging=true
camel.main.backlogTracing=true
camel.main.lightweight=false
camel.main.tracing=false
camel.main.useBreadcrumb=true

Any ideas? Any hints for a good documentation?

I have some more less important questions but I will open another issue for those.

With kind recards Bert


Finally here are screenhots of debugging tab (with empty body) and trace tab (with body content):

enter image description here



Solution 1:[1]

I found the reason for my problem:

I used Camel 3.15.0 which is currently not supported by the camel plugin of hawt.io. When using latest 3.14.x it works like a charm :-)

Hopefully there is still a maintainer of the camel plugin who will improve it in the near future. I am willing to contribute but the hawt.io developer information is not accessible and I am not able to understand how to run hawt.io from source locally .... especially how to include the camel plugin, which is in a separate github project.

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 Bert Speckels