Timer

Timer

Description: The Timer Component is for generating message exchanges when a timer fires.
Scheme: timer
Syntax: timer:timerName
Maven: org.apache.camel/camel-core/2.16.1

Represents a timer endpoint that can generate periodic inbound exchanges triggered by a timer.

Name Kind Group Required Default Type Enum Description
timerName path consumer true java.lang.String The name of the timer
delay parameter consumer 1000 long The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the time option.

The default value is 1000.

fixedRate parameter consumer boolean Events take place at approximately regular intervals, separated by the specified period.
period parameter consumer 1000 long If greater than 0, generate periodic events every period milliseconds.

The default value is 1000.

repeatCount parameter consumer 0 long Specifies a maximum limit of number of fires. So if you set it to 1, the timer will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative means fire forever.
daemon parameter advanced true boolean Specifies whether or not the thread associated with the timer endpoint runs as a daemon.

The default value is true.

exchangePattern parameter advanced InOnly org.apache.camel.ExchangePattern InOnly
RobustInOnly
InOut
InOptionalOut
OutOnly
RobustOutOnly
OutIn
OutOptionalIn
Sets the default exchange pattern when creating an exchange.
synchronous parameter advanced false boolean Sets whether synchronous processing should be strictly used, or Camel is allowed to use asynchronous processing (if supported). @param synchronous true to enforce synchronous processing
time parameter advanced java.util.Date A java.util.Date the first event should be generated. If using the URI, the pattern expected is: yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss.
timer parameter advanced java.util.Timer To use a custom {@link Timer}

timer consumer

The timer consumer.