Class ScheduledCommandHandler
FluxCapacitor.scheduleCommand(java.lang.Object, java.time.Instant)
methods or via the MessageScheduler
.
This component listens to Schedule
messages containing serialized command payloads wrapped in
ScheduledCommand
. When a scheduled time is reached, the handler triggers the dispatch of the command. The
handler attempts to deserialize and dispatch the command using the standard FluxCapacitor
command gateway.
Deserialization is attempted prior to dispatch to ensure that any configured
dispatch interceptors
are invoked. Many
interceptors (e.g. those for correlation, routing, data protection, or metrics) require access to the command payload
and metadata, and therefore rely on a proper
DeserializingMessage
context.
If deserialization fails (e.g. due to an unknown type or missing class), the command is appended directly to the
lower level command gateway client
using a raw
SerializedMessage
.
Consumers typically do not invoke or register this handler directly. It is automatically configured
in the Flux Capacitor client unless explicitly disabled using
FluxCapacitorBuilder.disableScheduledCommandHandler()
.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ScheduledCommandHandler
public ScheduledCommandHandler()
-