Class Schedule
java.lang.Object
io.fluxcapacitor.common.api.Request
io.fluxcapacitor.common.api.Command
io.fluxcapacitor.common.api.scheduling.Schedule
- All Implemented Interfaces:
JsonType
Command to schedule a batch of messages for future delivery.
Each message in the messages
list is wrapped as a SerializedSchedule
, which contains the payload,
metadata, and deadline. Messages will be automatically dispatched once their scheduled deadline is reached.
Each scheduled message must have a unique scheduleId
. If a schedule with the same ID already exists,
it will be replaced unless ifAbsent in SerializedSchedule
is set to true
, in which
case the existing schedule is preserved.
Usage
Scheduling is typically done via higher level APIs inFluxCapacitor
but can also be done using the
lower-level SchedulingClient
that uses Flux Platform APIs.
Handling
Scheduled messages are typically handled by @HandleSchedule
methods at or near their timestamp
.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Lightweight metric representation of thisSchedule
command, used for monitoring purposes. -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.fluxcapacitor.common.api.Command
getGuarantee, routingKey
-
Constructor Details
-
Schedule
public Schedule()
-
-
Method Details
-
toString
-
toMetric
Description copied from interface:JsonType
Converts this object into a compact metric representation for logging or monitoring.Used by the Flux client to avoid logging large payloads directly while still tracking platform usage.
- Returns:
- a safe and compact object suitable for serialization to the metrics log
-