30.8. 带有 groupInterval 示例的吞吐量日志记录器
此路由将导致每 10 秒记录消息统计,即使没有任何消息流量,也应该会显示初始 60s 延迟和统计数据。
from("activemq:orders").
to("log:com.mycompany.order?level=DEBUG&groupInterval=10000&groupDelay=60000&groupActiveOnly=false").to("bean:processOrder");
from("activemq:orders").
to("log:com.mycompany.order?level=DEBUG&groupInterval=10000&groupDelay=60000&groupActiveOnly=false").to("bean:processOrder");
将记录以下内容:
"Received: 1000 new messages, with total 2000 so far. Last group took: 10000 millis which is: 100 messages per second. average: 100"
"Received: 1000 new messages, with total 2000 so far. Last group took: 10000 millis which is: 100 messages per second. average: 100"