Class DeleteEvents

java.lang.Object
io.fluxcapacitor.common.api.Request
io.fluxcapacitor.common.api.Command
io.fluxcapacitor.common.api.eventsourcing.DeleteEvents
All Implemented Interfaces:
JsonType

public class DeleteEvents extends Command
Command to permanently delete all events associated with a specific aggregate ID.

This command removes all persisted events for the given aggregateId from the event store. It is a destructive operation and should only be used for administrative purposes, such as:

  • GDPR-compliant data removal
  • Erasing corrupt or invalid aggregate histories
  • Manually cleaning up obsolete aggregates

Important Notes

  • This command bypasses typical safety checks and event sourcing protections
  • The deletion is not reversible
  • Snapshots, if any, are not deleted by this command
See Also:
  • Constructor Details

    • DeleteEvents

      public DeleteEvents()
  • Method Details

    • routingKey

      public String routingKey()
      Returns the routing key used to partition or locate the event stream. This is typically the aggregate ID.
      Overrides:
      routingKey in class Command
      Returns:
      a routing key string, or null if not specified