Date: Tue, 19 Mar 2024 13:23:08 +0000 (UTC) Message-ID: <1034280718.57067.1710854588860@cwiki-he-fi.apache.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_57066_175971617.1710854588860" ------=_Part_57066_175971617.1710854588860 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
Available as of Camel 2.3
Some of the Camel compo= nents offers options to specify a time period, which must be entered in= milli second as unit. This may be unfriendly to read as a human when the v= alue is large such as 45min =3D 2700000 millis.
So in Camel 2.3 you can now configure any endpoint uri parameter using a= String syntax, which at runtime will get converted to millis (long type).<= /p>
You can use the following short syntax, which is most common to use:
Syntax |
Unit |
---|---|
h |
hour |
m |
minute |
s |
second |
So for example the Timer= endpoint can be configured as follows
from("timer:f= oo?period=3D45m").to("log:foo");
You can mix and match the units so you can do this as well:
from("timer:f= oo?period=3D1h15m").to("log:foo"); from("timer:bar?period=3D2h30s").to("log:bar"); from("timer:bar?period=3D3h45m58s").to("log:bar");
However you can also use long syntax
Syntax |
Unit |
---|---|
hour or hours |
hour |
minute or minutes |
minute |
second or seconds |
second |
from("timer:f= oo?period=3D45minutes").to("log:foo");