|
This version is still in development and is not considered stable yet. |
Time Channel Adapter
The time adapter generates periodic ticks and injects them as messages into the flow.
It is useful for scheduled pipelines, external resource polling, and timer-based workflows.
Usage
Pipelite.defineFlow("scheduled-flow")
.fromSource("time://ticker?period=5000") (1)
.process("check", (exchange, contribution) -> {
// logic executed every 5 seconds
})
.toSink("slf4j://log")
.build();
| 1 | Generates a tick every 5000 ms. |
The same settings can be applied through the typed TimeSourceConfigurer instead of a query
string (see Custom Channel Adapters for the general mechanism):
.fromSource("time://ticker", (TimeSourceConfigurer c) -> c
.period(5000)
.timeUnit(TimeUnit.MILLISECONDS))
URL format
time://<name>[?period=<ms>&initialDelay=<ms>&timeUnit=<unit>&batchSize=<n>&durableInbox=<bool>]
| Parameter | Default | Description |
|---|---|---|
|
(required) |
Logical name of the timer (e.g. |
|
|
Tick period in milliseconds |
|
|
Delay before the first tick |
|
|
Unit for |
|
|
Ticks drained per poll |
|
|
Unlike every other source adapter, |