Class Schedule

All Implemented Interfaces:
JsonType

public class Schedule extends Command
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 in FluxCapacitor 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:
  • Constructor Details

    • Schedule

      public Schedule()
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toMetric

      public Object 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