Class WebSocketEventStoreClient

java.lang.Object
io.fluxzero.sdk.common.websocket.AbstractWebsocketClient
io.fluxzero.sdk.persisting.eventsourcing.client.WebSocketEventStoreClient
All Implemented Interfaces:
WebsocketEndpoint, EventStoreClient, ModelCommitBatchingClient, AutoCloseable

public class WebSocketEventStoreClient extends AbstractWebsocketClient implements EventStoreClient, ModelCommitBatchingClient
WebSocket-based implementation of the EventStoreClient, enabling interaction with the Fluxzero Runtime's event store via a persistent WebSocket connection.

This implementation supports:

  • Storing events for event-sourced aggregates
  • Efficient, paginated retrieval of aggregate event streams
  • Deleting aggregate event streams
  • Maintaining aggregate/entity relationships

The fetchBatchSize setting controls how many events are fetched per paginated request when loading an aggregate's event history. The aggregate-history byte setting in WebSocketClient.ClientConfig independently bounds the cumulative serialized event-payload bytes requested per page. An individually oversized first event is still returned so paging can advance.

End users rarely interact with this client directly. Instead, they typically use higher-level abstractions such as EventStore or AggregateRepository.

See Also: