简体   繁体   English

Apache Camel 和 hawt.io 调试:正文/标题在断点处不可见

[英]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.我目前正在使用Apache Camelhawt.io来监控和调试我的 Camel 路由。 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.但是,如果我在路由中的那个点设置消息处理停止断点,我在那个点看不到我的 Camel 交换的任何“正文”或“标头” I've tried all sorts of settings:我尝试了各种设置:

  • tracing / backlog tracing enabled on CamelContext在 CamelContext 上启用跟踪/积压跟踪
  • tracing / backlog tracing enabled on route在路由上启用跟踪/积压跟踪
  • Adjusted settings on MBean "BacklogDebugger" and "BacklogTracer".调整了 MBean“BacklogDebugger”和“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.在“Trace”选项卡上进行跟踪非常有效:如果我在“Trace”选项卡中激活跟踪,我可以看到我的消息流经路由的所有节点。

Only when stopping at the breakpoint is the body and header not displayed.只有停在断点处才不会显示body和header。


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.编辑:在对其他方面进行一些更改(例如为大多数路由节点分配 ID)后,调试工作包括正文和标题的显示。 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同时我的应用程序属性“camel.main.debugging=true”在启动时失败

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.我没有使用任何特殊的框架:普通的旧 Java 和我启动 Camel-Main 的 Main 方法。
  • Apache Camel: 3.14.1 Apache 骆驼:3.14.1
  • Jolokai Agent: 1.7.1 Jolokai代理:1.7.1
  • hawt.io: 2.14.5 hawt.io:2.14.5
  • Exchange body type: DOMSource交换主体类型: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):最后是调试选项卡(带有空主体)和跟踪选项卡(带有正文内容)的屏幕截图:

在此处输入图像描述

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.我使用的是 Camel 3.15.0,它目前不受 hawt.io 的 camel 插件的支持。 When using latest 3.14.x it works like a charm:-)使用最新的 3.14.x 时,它就像一个魅力:-)

Hopefully there is still a maintainer of the camel plugin who will improve it in the near future.希望 camel 插件的维护者会在不久的将来对其进行改进。 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.我愿意做出贡献,但无法访问 hawt.io 开发人员信息,而且我无法理解如何从本地源代码运行 hawt.io ....尤其是如何包含 camel 插件,它位于单独的 github 项目中.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM