##
##  nats-streaming-server.conf -- NATS streaming server configuration
##

id:                   "node1"

store:                "@store@"
dir:                  "@l_prefix@/var/nats-streaming-server/data/store"

debug:                true
trace:                true
stan_debug:           false
stan_trace:           false

nats_server:          "nats://example:example@127.0.0.1:4242"

hb_interval:          "10s"
hb_timeout:           "10s"
hb_fail_count:        2

secure:               true
tls_client_cacert:    "@l_prefix@/etc/nats-server/ca.crt"
tls_client_cert:      "@l_prefix@/etc/nats-server/server.crt"
tls_client_key:       "@l_prefix@/etc/nats-server/server.key"

store_limits {
    max_channels:     100
    max_subs:         100
    max_msgs:         10000
    max_bytes:        10240000
    max_age:          "24h"
}

file {
    compact:          true
    compact_frag:     50
    compact_interval: 300
    compact_min_size: 10485760
    buffer_size:      2097152
    crc:              true
    crc_poly:         3988292384
    sync:             true
    slice_max_msgs:   10000
    slice_max_bytes:  67108864
    slice_max_age:    "24h"
}

sql {
    driver:           "postgres"
    source:           "postgresql://nats:nats@127.0.0.1:5432/nats?sslmode=disable"
    no_caching:       true
    max_open_conns:   16
}

# cluster {
#     node_id:          "node1"
#     peers:            [ "node2", "node3" ]
#     bootstrap:        true
#     log_path:         "@l_prefix@/var/nats-streaming-server/data/raft"
#     log_cache_size:   512
#     log_snapshots:    2
#     trailing_logs:    10240
#     sync:             false
# }

