Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</property>
</bean>

<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#" xmlns="http://camel.apache.org/schema/spring">
<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#-cron1" xmlns="http://camel.apache.org/schema/spring">
<route id="quartzRoute">
<from uri="quartzBean://app/test?cron=0+0/1+*+1/1+*+?+*"/>
<to uri="log:trigger"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</property>
</bean>

<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#1" xmlns="http://camel.apache.org/schema/spring">
<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#-cron2" xmlns="http://camel.apache.org/schema/spring">
<route id="quartzRoute">
<from uri="quartzBean://app/test?cron=0+0/2+*+1/1+*+?+*"/>
<to uri="log:trigger"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</property>
</bean>

<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#" xmlns="http://camel.apache.org/schema/spring">
<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#-opts1" xmlns="http://camel.apache.org/schema/spring">
<route id="quartzRoute">
<from uri="quartzBean://app/test?trigger.repeatInterval=10&amp;trigger.repeatCount=1"/>
<to uri="log:trigger"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</property>
</bean>

<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#" xmlns="http://camel.apache.org/schema/spring">
<camelContext id="camelContext-{{testClassSimpleName}}" managementNamePattern="#name#-opts2" xmlns="http://camel.apache.org/schema/spring">
<route id="quartzRoute">
<from uri="quartzBean://app/test?trigger.repeatInterval=20&amp;trigger.repeatCount=2"/>
<to uri="log:trigger"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,12 @@ public class BacklogTracer extends ServiceSupport implements org.apache.camel.sp
public static final int MAX_BACKLOG_SIZE = 1000;
private final CamelContext camelContext;
private final Language simple;
private boolean enabled;
private boolean standby;
// enabled, standby, and activityEnabled (further below) are toggled at runtime via
// JMX/management APIs while routing threads read them in shouldTrace() and traceEvent().
// Other boolean fields (removeOnDump, bodyIncludeStreams, traceRests, etc.) are set during
// initialization and do not change while routes are processing, so they do not need volatile.
private volatile boolean enabled;
private volatile boolean standby;
private final AtomicLong traceCounter = new AtomicLong();
// use a queue with an upper limit to avoid storing too many messages
private final Queue<BacklogTracerEventMessage> queue = new LinkedBlockingQueue<>(MAX_BACKLOG_SIZE);
Expand All @@ -87,7 +91,8 @@ public class BacklogTracer extends ServiceSupport implements org.apache.camel.sp
private boolean includeExchangeProperties = true;
private boolean includeExchangeVariables = true;
private boolean includeException = true;
private boolean activityEnabled;
// volatile: toggled at runtime via JMX, same rationale as enabled/standby above
private volatile boolean activityEnabled;
private boolean traceRests;
private boolean traceTemplates;
// a pattern to filter tracing nodes
Expand Down