Class MassiveStreamOptions
- Namespace
- MassiveDotNet.WebSocket
- Assembly
- MassiveDotNet.WebSocket.dll
Configuration for a Massive streaming client.
public sealed class MassiveStreamOptions
- Inheritance
-
MassiveStreamOptions
- Inherited Members
Properties
ApiKey
The API key used to authenticate the stream. Required.
public string? ApiKey { get; set; }
Property Value
Remarks
Unlike REST, this key travels in a message rather than a header (D-W9). It is never rendered into an exception message, traced, or written to disk (rule 11).
Feed
The feed host to connect to. Defaults to RealTime.
public Uri Feed { get; set; }
Property Value
HandshakeTimeout
How long connect, authentication, and subscription acknowledgement may take. Defaults to 10 seconds.
public Duration HandshakeTimeout { get; set; }
Property Value
KeepAliveInterval
The WebSocket keep-alive interval. Defaults to 20 seconds.
public Duration KeepAliveInterval { get; set; }
Property Value
MaxMessageBytes
The largest message accepted, in bytes. Defaults to 4 MiB.
public int MaxMessageBytes { get; set; }
Property Value
Remarks
A ceiling on frame reassembly. Without it a server could make the client allocate without limit, which is the one unbounded growth path the protocol leaves open.
Reconnect
Reconnect behaviour, or null to surface a dropped connection instead of re-establishing it. On by default.
public MassiveStreamReconnectOptions? Reconnect { get; set; }
Property Value
Remarks
This inverts D30's posture, where rate limiting and retry are off until a caller opts in. The reason they differ: a caller's request rate is theirs to choose and the SDK cannot infer a tier, whereas a stream that ends on the first dropped connection is not a streaming client at all. Authentication failure is never retried regardless of this setting (D-W6).
TickerPoolCapacity
How many distinct ticker symbols are interned. Defaults to 16384.
public int TickerPoolCapacity { get; set; }
Property Value
TopicBufferCapacity
How many events each subscribed topic buffers before the oldest is dropped. Defaults to 1024.
public int TopicBufferCapacity { get; set; }
Property Value
Remarks
This is the SDK's whole memory budget for a stream, and it is arithmetic a caller can do in advance: capacity multiplied by the event size, multiplied by the number of topics subscribed. Nothing here grows with time or with messages received.
UserAgent
An optional product token appended to the User-Agent header.
public string? UserAgent { get; set; }
Property Value
Methods
Validate()
Throws if the options are not in a usable state.
public void Validate()
Exceptions
- InvalidOperationException
The API key is missing, the feed is not an absolute URI, or a capacity or duration cannot be acted on.