WebSocket
Schemes: ws://, wss://
Query parameters recognised as config fields for this connector. The object-typed tls is set with a JSON literal, e.g. ?tls={...}. Any other ?key=value pair is passed through unchanged as a driver option on the connection URL.
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
backlog | integer | no | — | (Consumer only) TCP listen backlog (pending-connection queue depth) for the accept socket. Raise this if high-concurrency handshake bursts are being dropped/reset before accept() can keep up. Defaults to 4096, which is higher than the OS/tokio default of 1024. |
basic_auth | array of any | no | — | HTTP Basic credentials (username, password): a consumer requires them, a publisher sends them. |
execution_mode | auto | direct_only | routed | no | auto | (Consumer only) Selects whether WebSocket routes run directly or through the routed pipeline. |
max_connections | integer | no | — | (Consumer only) Maximum number of concurrent connections; additional connections receive 503. Unset = no limit. |
message_id_header | string | no | — | (Consumer only) Header key to extract the message ID from the WebSocket handshake. Defaults to “message-id”. |
path | string | no | — | (Consumer only) Optional request path filter. If set, only upgrade requests whose URI path matches exactly are delivered to this consumer. |
routed_queue_capacity | integer | no | — | (Consumer only) Queue capacity for the routed adapter. Direct response routes do not use this queue. Defaults to 100. |
tls | object | no | see below | TLS: a consumer listens with cert_file and key_file; a publisher uses it for a wss:// URL. |
url | string | yes | — | For consumers, the listen address (e.g. “0.0.0.0:9000”). For publishers, the target URL. |
Struct-typed fields
tls
TLS configuration for secure connections.
Configures Transport Layer Security (TLS/SSL) for encrypted communication. Supports both client certificate (mutual TLS) and server certificate validation.
Examples
use mq_bridge::models::TlsConfig;
let tls = TlsConfig {
required: true,
ca_file: Some("/path/to/ca.pem".to_string()),
cert_file: Some("/path/to/cert.pem".to_string()),
key_file: Some("/path/to/key.pem".to_string()),
..Default::default()
};
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
accept_invalid_certs | boolean | no | false | If true, disable server certificate verification (insecure). |
ca_file | string | no | — | Path to the CA certificate file. |
cert_file | string | no | — | Path to the client certificate file (PEM). |
cert_password | string | no | — | Password for the private key (if encrypted). |
key_file | string | no | — | Path to the client private key file (PEM). |
required | boolean | no | false | If true, enable TLS/SSL. |