This tutorial walks you through the process of tracing a message through a route.
In this tutorial you will:
run a route in the Fuse Integration perspective
enable tracing on your route
drop messages onto your route and track them through the route's nodes
To complete this tutorial you will need the simple-route project
you updated in Adding a Content-Based Router.
To trace a message through your route:
Select || to open the Fuse Integration perspective as shown in Figure 4.1).
![[Tip]](imagesdb/tip.gif)
Tip You can use the Open Perspective icon (
) in the perspectives tab to access the list of
available perspectives.In Project Explorer, expand the
simple-routeproject to expose thesrc/main/resources/META-INF/spring/camel-context.xmlfile.Select | from the
camel-context.xmlfile's context menu.In JMX Explorer, expand Local Processes.
Double click to expand the elements of your route as shown in Figure 4.2).
In JMX Explorer, select from the 's context menu.
Fuse IDE displays a graphical representation of your route in Diagram View.
In Diagram View, drag the nodes to rearrange them, so you can clearly see the route's flow paths.
![[Tip]](imagesdb/tip.gif)
Tip You will have to rearrange the nodes in Diagram View each time you select a different node in JMX Explorer.
In Project Explorer, expand
simple-route/src/data, so you can access themessage1.xmlandmessage2.xmlfiles as shown in Figure 4.3.Drag
message1.xmland drop it on.../camel-1/Endpoints/file/src/data?noop=true.As the message traverses the route, Fuse IDE traces and records its passage at each step and displays the results in Messages View.
Repeat Step 9.
Drag
message2.xmldrop it on.../camel-1/Endpoints/file/src/data?noop=true.Repeat Step 11.
In the bottom, right panel, switch from Console to Messages View.
In JMX Explorer, click to populate Messages View with the traces of each message.
As shown in Figure 4.4, Fuse IDE draws the route in Diagram View, tagging paths exiting a processing step with timing and performance metrics. Only the metric Total exchanges is displayed in the diagram. Hovering over the displayed metrics reveals additional metrics about message flow:
mean time the step took to process a message
maximum time the step took to process a message
minimum time the step took to process a message
In Messages View, click a message instance.
The associated step in the route is highlighted in Diagram View. You can step through the message instances to see how a particular message traversed the route and whether it was processed as expected at each step in the route.
Fuse IDE displays the details about a message instance in the top half of the Properties panel and the contents of the message instance, including any headers, in the bottom half of the Properties panel. So, if your application sets headers at any step within a route, you can check whether they are set as expected.
![[Tip]](imagesdb/tip.gif)
Tip You can control columnar layout in all Fuse IDE tables. Drag a column's border rule to expand or contract its width. To hide a column, totally contract its borders. You can rearrange table layout by reordering its columns. To do so, drag a column header to where you want it to appear in the table.
When done, switch back to the Console and click the button (
) in the upper, right side of its pane.
You can run the route with a JUnit test case, as described in Testing a Route with JUnit.











