Class WsEndpointOptions
Options for the WebSocket endpoint. Shared by both producer and consumer.
URI format: ws:host:port/path?messageType=Text&subProtocol=graphql-ws
public class WsEndpointOptions : EndpointOptions
Inheritance
Inherited Members
Properties
ConnectionFactory
Named from the route registry. Lets the TLS certificate
[RegistryReference(typeof(WsConnectionFactory))]
public string? ConnectionFactory { get; set; }
ConnectTimeout
Connect timeout in milliseconds. Default: 10000 (10s). 0 = infinite.
public int ConnectTimeout { get; set; }
InOut
If true, the consumer returns the exchange Out body as a WebSocket response frame (InOut pattern).
public bool InOut { get; set; }
KeepAliveInterval
Keep-alive ping interval in milliseconds. 0 = disabled. Default: 30000 (30s).
public int KeepAliveInterval { get; set; }
MaxConnections
Maximum concurrent WebSocket connections. 0 = unlimited. Default: 0.
public int MaxConnections { get; set; }
MaxReconnectAttempts
Maximum reconnect attempts. 0 = unlimited. Default: 0.
public int MaxReconnectAttempts { get; set; }
MessageType
Default message type for outgoing frames. Default: Text.
public WsMessageType MessageType { get; set; }
Mode
Producer mode. Client (default) connects to a remote server with
public WsMode Mode { get; set; }
ReceiveBufferSize
Receive buffer size in bytes. Default: 8192.
public int ReceiveBufferSize { get; set; }
ReconnectInterval
Interval between reconnect attempts in milliseconds. Default: 5000.
public int ReconnectInterval { get; set; }
ReconnectTimeout
Overall time budget for reconnecting, in milliseconds. 0 = no budget (default, the
public int ReconnectTimeout { get; set; }
SendBufferSize
Send buffer size in bytes (ClientWebSocket only). Default: 8192.
public int SendBufferSize { get; set; }
SslCertPath
Path to PFX certificate file for TLS (consumer/server). Required when ssl=true for consumer.
public string? SslCertPath { get; set; }
SubProtocol
WebSocket subprotocol to negotiate (e.g. "graphql-ws", "mqtt").
public string? SubProtocol { get; set; }
TrustAllCertificates
Producer only: accept any server certificate on a wss:// connection, including a
public bool TrustAllCertificates { get; set; }
Methods
Validate()
Validates required parameters and constraints. Called after BindFromUri.
public override void Validate()