# Broker id. Used to identify local node of the replication mesh
id = 1

# A commitlog read will pull full segment. Make sure that a segment isn't
# too big as async tcp writes readiness of one connection might affect tail
# latencies of other connection. Not a problem with preempting runtimes
[router]
id = 0
dir = "/tmp/rumqttd"
max_segment_size = 10240
max_segment_count = 10
max_connections = 10001

# Configuration of server and connections that it accepts
[servers.1]
port = 1884
next_connection_delay_ms = 1
    [servers.1.connections]
    connection_timeout_ms = 100
    max_client_id_len = 256
    throttle_delay_ms = 0
    max_payload_size = 2048
    max_inflight_count = 500
    max_inflight_size = 1024

# Configuration of server and connections that it accepts
[servers.2]
port = 8884
next_connection_delay_ms = 10
    # Tls connections. ca_path enables client authentication
    [servers.2.connections]
    connection_timeout_ms = 100
    max_client_id_len = 256
    throttle_delay_ms = 0
    max_payload_size = 2048
    max_inflight_count = 100
    max_inflight_size = 1024
    cert_path = "tlsfiles/server.cert.pem"
    key_path = "tlsfiles/server.key.pem"
    ca_path = "tlsfiles/ca-chain.cert.pem"

# Cluster configuration. Remote host and port to connect to.
# Mesh is created based on ids.
# 0 connects to 1 & 2 as client
# 1 connects to 2 as client and waits for 0 as a server
# 2 waits for 0 and 1 as a server
[cluster]
    [cluster.0]
    host = "localhost"
    port = 1800
    [cluster.1]
    host = "localhost"
    port = 1801
    # [cluster.2]
    # host = "localhost"
    # port = 1802

# Io configuration for replication
[replicator]
connection_timeout_ms = 100
max_client_id_len = 256
throttle_delay_ms = 0
max_payload_size = 2048
max_inflight_count = 500
max_inflight_size = 1024

[console]
port = 3031
