Apache Iggy
SDK

Connection Strings

The canonical reference for Iggy connection strings, covering every scheme, credential form and option.

A connection string configures an Iggy client in a single line: transport, credentials, server address, and options. This page is the canonical reference for every scheme, credential form, and option key.

Connection strings are supported by the Rust SDK and the SDKs that wrap it (Python, C++, PHP).

Format

iggy[+transport]://credentials@host:port[?option=value&option=value]

The host and port are always required. Options are appended as key=value pairs separated by &.

Unknown option keys are hard errors. The parser rejects the whole string with InvalidConnectionString instead of ignoring the key, so a typo fails fast rather than silently falling back to a default.

Transport selection

The scheme picks the transport. Each transport has its own default server port:

SchemeTransportDefault server port
iggy://TCP (default)8090
iggy+tcp://TCP8090
iggy+quic://QUIC8080
iggy+http://HTTP3000
iggy+ws://WebSocket8092

Credentials

Two forms are accepted:

Username and password, separated by a colon. Both parts must be non-empty:

iggy://username:password@localhost:8090

Personal Access Token: any credential without a colon is treated as a PAT. Server-minted tokens are plain base64 strings with no prefix, so paste the token exactly as the server returned it:

iggy://<personal-access-token>@localhost:8090

Do not prepend anything to the token. Strings like iggypat-... appear only in Iggy's own test code. A real token with a prefix added will fail to log in.

The default iggy/iggy root credentials only exist when the server was started with --with-default-root-credentials (or with IGGY_ROOT_USERNAME/IGGY_ROOT_PASSWORD set) on its first boot. Otherwise the root user gets a generated password and samples using iggy:iggy fail with InvalidCredentials:

cargo run --bin iggy-server -- --fresh --with-default-root-credentials

Duration values

Options typed as durations take human-readable values such as 5s, 500ms, or 1m, unless a table below says the value is a plain number.

TCP options

KeyDescriptionDefault
tlsEnable TLS (true/false)false
tls_domainDomain name for TLS validationempty
tls_ca_filePath to a CA certificate filenone
reconnection_retriesNumber of reconnection attempts, or unlimitedunlimited
reconnection_intervalDuration between reconnection attempts1s
reestablish_afterDuration to wait before reestablishing the connection5s
heartbeat_intervalDuration between heartbeats5s
nodelayEnable TCP_NODELAY (true/false)false
iggy://iggy:iggy@localhost:8090?tls=true&tls_domain=example.com&reconnection_retries=5&heartbeat_interval=3s&nodelay=true

QUIC options

The QUIC reconnection keys differ from TCP: reconnection_max_retries (not reconnection_retries) and reconnection_reestablish_after (not reestablish_after). Using the TCP names in a QUIC string is a hard error.

KeyDescriptionDefault
response_buffer_sizeResponse buffer size in bytes10000000
max_concurrent_bidi_streamsMaximum concurrent bidirectional streams10000
datagram_send_buffer_sizeDatagram send buffer size in bytes100000
initial_mtuInitial MTU1200
send_windowSend window size100000
receive_windowReceive window size100000
keep_alive_intervalKeep-alive interval in milliseconds (number)5000
max_idle_timeoutMaximum idle timeout in milliseconds (number)10000
validate_certificateValidate the server certificate (true/false)false
heartbeat_intervalDuration between heartbeats5s
reconnection_max_retriesNumber of reconnection attempts, or unlimitedunlimited
reconnection_intervalDuration between reconnection attempts1s
reconnection_reestablish_afterDuration to wait before reestablishing the connection5s
iggy+quic://iggy:iggy@localhost:8080?validate_certificate=false&reconnection_max_retries=5

WebSocket options

KeyDescriptionDefault
heartbeat_intervalDuration between heartbeats5s
reconnection_retriesNumber of reconnection attempts, or unlimitedunlimited
reconnection_intervalDuration between reconnection attempts1s
reestablish_afterDuration to wait before reestablishing the connection5s
read_buffer_sizeRead buffer size in bytestransport default
write_buffer_sizeWrite buffer size in bytestransport default
max_write_buffer_sizeMaximum write buffer size in bytestransport default
max_message_sizeMaximum WebSocket message size in bytestransport default
max_frame_sizeMaximum WebSocket frame size in bytestransport default
accept_unmasked_framesAccept unmasked frames (true/false)transport default
tlsEnable TLS (true/false)false
tls_domainDomain name for TLS validationempty
tls_ca_filePath to a CA certificate filenone
tls_validate_certificateValidate the server certificate (true/false)false
iggy+ws://iggy:iggy@localhost:8092?heartbeat_interval=5s&max_message_size=1048576

HTTP options

KeyDescriptionDefault
heartbeat_intervalDuration between heartbeats5s
retriesNumber of request retries3
iggy+http://iggy:iggy@localhost:3000?retries=5

Usage

use iggy::prelude::*;

// TCP with default options
let client = IggyClient::from_connection_string("iggy://iggy:iggy@localhost:8090")?;

// QUIC
let client = IggyClient::from_connection_string("iggy+quic://iggy:iggy@localhost:8080")?;

// WebSocket
let client = IggyClient::from_connection_string("iggy+ws://iggy:iggy@localhost:8092")?;

// HTTP
let client = IggyClient::from_connection_string("iggy+http://iggy:iggy@localhost:3000")?;
# Python
client = IggyClient.from_connection_string("iggy://iggy:iggy@localhost:8090")

When you need settings a connection string cannot express (a custom Encryptor, a Partitioner, and similar), start from IggyClientBuilder::from_connection_string() and extend the builder on top.

On this page