TsgcWSPServer_sgc › Properties › History
Per-channel message history options (Enabled, Size, TTLSeconds) used for reconnect recovery.
property History: TsgcWSHistoryOptions read FHistory write SetHistory;
—
When history is enabled, every message published to a channel is assigned a monotonic offset and kept in a bounded per-channel buffer. Clients that resubscribe after a reconnection send their last-seen offset and the server replays the messages they missed. History is opt-in and disabled by default, so existing behavior is unchanged until you enable it.
Boolean, default False. Turns per-channel history on. While False the server keeps no history and behaves exactly as before.Integer, default 1000. Maximum number of messages retained per channel. Set to 0 for unlimited (bounded only by available memory and TTLSeconds, if set).Integer, default 0. When greater than 0, entries older than this number of seconds are evicted. 0 means no time-based expiry. In .NET this member is named TtlSeconds.In a multi-node cluster the history is node-local in this release: reconnect recovery works when the client reconnects to the same node that holds the channel history. Shared history across cluster nodes is planned for a future release.
oProtocol.History.Enabled := True;
oProtocol.History.Size := 1000; // keep last 1000 messages per channel
oProtocol.History.TTLSeconds := 3600; // optional: also expire after 1 hour