Dear community,

When I using Camel Quarkus and use camel-knative event producer, the thread 
name is vert.x-eventloop-thread-xxx and the fields from MDCUnitOfWork (like 
camel.routeId) is missing. Is there any special configuration needed to show 
the MDCUnitOfWork fields in my log? Thanks!

The Camel Quarkus version is 2.13.3 and here is the sample code:

from("timer://foo?fixedRate=true&period=60000")
.routeId("route_timer_test")
.setBody(constant("test event"))
.setHeader(CloudEvent.CAMEL_CLOUD_EVENT_SOURCE, constant("test-route"))
.log("there is camel.routeId")
.to("knative:event/broker-test")
.log("there isn't camel.routeId")

The log format config is "quarkus.log.console.format=%d{yyyy-MM-dd 
HH:mm:ss,SSS} %-5p [%c{3.}] (%t) - %X{camel.routeId} - %s%e%n" and the result 
log is:

2024-07-11 13:53:51,273 INFO  [route_timer_test] (Camel (test-route) thread #2 
- timer://foo) - route_timer_test- there is camel.routeId
2024-07-11 13:53:51,401 INFO  [route_timer_test] (vert.x-eventloop-thread-0) -  
- there isn't camel.routeId

Reply via email to