SamplingPage edited by Eric JohnsonChanges (1)
Full ContentSampling ThrottlerAvailable as of Camel 2.1 A sampling throttler allows you to extract a sample of the exchanges from the traffic through a route. Will by default use a sample period of 1 seconds. SamplesYou use this EIP with the sample DSL as show in these samples. Using the Fluent Builders from("direct:sample") .sample() .to("mock:result"); from("direct:sample-configured") .sample(1, TimeUnit.SECONDS) .to("mock:result"); from("direct:sample-configured-via-dsl") .sample().samplePeriod(1).timeUnits(TimeUnit.SECONDS) .to("mock:result"); from("direct:sample-messageFrequency") .sample(10) .to("mock:result"); from("direct:sample-messageFrequency-via-dsl") .sample().sampleMessageFrequency(5) .to("mock:result"); Using the Spring XML Extensions <route> <from uri="direct:sample"/> <sample samplePeriod="1" units="seconds"> <to uri="mock:result"/> </sample> </route> <route> <from uri="direct:sample-messageFrequency"/> <sample messageFrequency="10"> <to uri="mock:result"/> </sample> </route> <route> <from uri="direct:sample-messageFrequency-via-dsl"/> <sample messageFrequency="5"> <to uri="mock:result"/> </sample> </route> And since it uses a default of 1 second you can omit this configuration in case you also want to use 1 second <route> <from uri="direct:sample"/> <!-- will by default use 1 second period --> <sample> <to uri="mock:result"/> </sample> </route> Using This PatternIf you would like to use this EIP Pattern then please read the Getting Started, you may also find the Architecture useful particularly the description of Endpoint and URIs. Then you could try out some of the Examples first before trying this pattern out. See Also
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > Sampling confluence
- [CONF] Apache Camel > Sampling confluence