Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate timer examples to 4.4 #125

Merged
merged 1 commit into from Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -81,12 +81,12 @@ public static class BasicCamelToReactorExampleRoutes extends RouteBuilder {
public void configure() throws Exception {

// Generating numbers every 5 seconds and forwarding to the stream "numbers"
from("timer:clock?period=5000")
from("timer:clock?period=5000&includeMetadata=true")
.setBody().header(Exchange.TIMER_COUNTER)
.to("reactive-streams:numbers");

// Generating strings every 4.9 seconds and forwarding to the stream "strings"
from("timer:clock2?period=4900&delay=2000")
from("timer:clock2?period=4900&delay=2000&includeMetadata=true")
.setBody().simple("Hello World ${header.CamelTimerCounter}!")
.to("reactive-streams:strings");

Expand Down
Expand Up @@ -80,7 +80,7 @@ public static class BasicCamelToReactorInOutExampleRoutes extends RouteBuilder {
public void configure() throws Exception {

// Generate a Id and retrieve user data from reactor
from("timer:clock?period=9000&delay=1500")
from("timer:clock?period=9000&delay=1500&includeMetadata=true")
.setBody().header(Exchange.TIMER_COUNTER).convertBodyTo(Long.class) // Sample ID
.bean("userBean", "getUserInfo") // Get the user info from reactor code
.process(new UnwrapStreamProcessor()) // Unwrap the Publisher
Expand Down
Expand Up @@ -19,7 +19,7 @@
# refer to the route configuration by the id to use for this route
routeConfigurationId: "yamlError"
from:
uri: "timer:yaml?period=3s"
uri: "timer:yaml?period=3s&includeMetadata=true"
steps:
- setBody:
simple: "Timer fired ${header.CamelTimerCounter} times"
Expand Down