Throughput logging

Camel's Log Component includes the ability to see the average throughput of messages flowing through your route. It is not a perfect measure, though it will help you tune your route to reach the throughput you are hoping for. It can also help you to validate that any Throttle EIPs (see the Throttler – restricting the number of messages flowing to an endpoint recipe in Chapter 2, Message Routing) you put in place are doing the right thing.

This recipe will show you how to use the Log Component to report (log) the average message flow throughput of your integration route.

Getting ready

The Java code for this recipe is located in the org.camelcookbook.monitoring.logthroughput package. The Spring XML files are located under src/main/resources/META-INF/spring ...

Get Apache Camel Developer's Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.