Created
April 12, 2022 05:30
-
-
Save tamalsaha/cc2607efee7d2b0c36565e830fec179b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
port: 4222 | |
https: 8222 | |
server_name: us-central-nats-demo | |
max_connections: 250000 | |
max_subscriptions: 200000 | |
reconnect_error_reports: 3600 | |
max_traced_msg_len: 64 | |
logfile_size_limit: 2GB | |
log_file: "/var/log/nats-server.log" | |
jetstream { | |
store_dir: /var/jetstream | |
max_mem_store: 10GiB | |
max_file_store: 410GiB | |
} | |
tls { | |
cert_file: "/etc/letsencrypt/live/demo.nats.io/fullchain.pem" | |
key_file: "/etc/letsencrypt/live/demo.nats.io/privkey.pem" | |
timeout: "5s" | |
} | |
# Allow both TLS and non-TLS to work on same port. | |
allow_non_tls: true | |
leafnodes { | |
port: 7422 | |
tls { | |
cert_file: "/etc/letsencrypt/live/demo.nats.io/fullchain.pem" | |
key_file: "/etc/letsencrypt/live/demo.nats.io/privkey.pem" | |
timeout: "5s" | |
} | |
} | |
no_auth_user: demo-user | |
demo_perms = { | |
publish = { | |
# Do not allow deletion of MQTT streams | |
deny = ["$JS.API.STREAM.DELETE.$MQTT_msgs", "$JS.API.STREAM.DELETE.$MQTT_rmsgs", "$JS.API.STREAM.DELETE.$MQTT_sess"] | |
} | |
} | |
accounts { | |
default: { | |
jetstream: { | |
max_mem: 8GiB | |
max_store: 400GiB | |
max_streams: 1024 | |
max_consumers: 8192 | |
} | |
users = [ { user: demo-user, permissions: $demo_perms} ] | |
} | |
$SYS: { | |
users = [ { nkey: UDEMO3ZANTMUGPSBS3H54WKJN3TNVGQBJUQFCT7H4MUQLCRRQ26CWIIP } ] | |
} | |
} | |
websocket { | |
port: 8443 | |
compression: true | |
handshake_timeout: "5s" | |
tls { | |
cert_file: "/etc/letsencrypt/live/demo.nats.io/fullchain.pem" | |
key_file: "/etc/letsencrypt/live/demo.nats.io/privkey.pem" | |
timeout: "5s" | |
} | |
no_auth_user: demo-user | |
} | |
mqtt { | |
port: 1883 | |
tls { | |
cert_file: "/etc/letsencrypt/live/demo.nats.io/fullchain.pem" | |
key_file: "/etc/letsencrypt/live/demo.nats.io/privkey.pem" | |
timeout: "5s" | |
} | |
no_auth_user: demo-user | |
ack_wait: "1m" | |
max_ack_pending: 1024 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment