Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

gRPC

Schemes: grpc://, grpcs://

Query parameters recognised as config fields for this connector. The object-typed tls is set with a JSON literal, e.g. ?tls={...}. Unrecognised parameters are not forwarded as driver options, so any other ?key=value pair is rejected rather than silently ignored.

NameTypeRequiredDefaultDescription
concurrency_limit_per_connectionintegernonullMaximum number of concurrent requests handled per connection. Server-mode only.
http2_keepalive_interval_msintegernonullHTTP/2 keepalive ping interval in milliseconds. Server-mode only. Default disabled
http2_keepalive_timeout_msintegernonullTimeout for a keepalive ping acknowledgement in milliseconds. Server-mode only.
initial_connection_window_sizeintegernonullHTTP/2 connection-level initial window size in bytes. Server-mode only.
initial_stream_window_sizeintegernonullHTTP/2 stream-level initial window size in bytes. Server-mode only.
max_decoding_message_sizeintegernonullMaximum size of a decoded incoming message in bytes. Server-mode only. Default 4 MiB.
server_modebooleannofalseIf true, start an embedded tonic gRPC server that accepts incoming Publish / PublishBatch RPCs. If false (the default), connect to a remote server as a client.
sharedbooleannotrue(Publisher only) Share one gRPC channel per connection (default: true); false forces a dedicated channel.
timeout_msintegernoTimeout in milliseconds. - Client mode: used as the connection timeout and per-request deadline. - Server mode: applied as the per-request deadline on the embedded server.
tlsobjectnosee belowTLS configuration.
topicstringnoTopic / subject used for both subscribe and publish paths.
urlstringyesThe gRPC server URL (e.g., “http://localhost:50051” for client or “0.0.0.0:50051” for server mode).

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()
};
NameTypeRequiredDefaultDescription
accept_invalid_certsbooleannofalseIf true, disable server certificate verification (insecure).
ca_filestringnoPath to the CA certificate file.
cert_filestringnoPath to the client certificate file (PEM).
cert_passwordstringnoPassword for the private key (if encrypted).
key_filestringnoPath to the client private key file (PEM).
requiredbooleannofalseIf true, enable TLS/SSL.