58 lines
788 B
Plaintext
58 lines
788 B
Plaintext
# NATS Clients Port
|
|
port: 4222
|
|
# PID file shared with configuration reloader.
|
|
# pid_file: "/var/run/nats/nats.pid"
|
|
|
|
# Monitoring
|
|
http: 8222
|
|
server_name: nats-0
|
|
server_tags: [
|
|
"mem:4Gi",
|
|
]
|
|
# NATS JetStream
|
|
jetstream {
|
|
max_mem:2G
|
|
store_dir: "/data"
|
|
max_file:10Gi
|
|
unique_tag: "natsuniquetag"
|
|
}
|
|
|
|
# Auth
|
|
authorization: {
|
|
default_permissions = {
|
|
publish = {
|
|
deny: ">"
|
|
}
|
|
subscribe = {
|
|
deny: ">"
|
|
}
|
|
}
|
|
ADMIN = {
|
|
publish = ">"
|
|
subscribe = ">"
|
|
}
|
|
users: [
|
|
{
|
|
user: server,
|
|
password: server,
|
|
permissions: $ADMIN
|
|
},
|
|
{
|
|
user: "agent-1",
|
|
password: "1"
|
|
permissions: {
|
|
publish: "c.1.>"
|
|
subscribe: "c.1.>"
|
|
}
|
|
},
|
|
{
|
|
user: "agent-2",
|
|
password: "2"
|
|
permissions: {
|
|
publish: "c.2.>"
|
|
subscribe: "c.2.>"
|
|
}
|
|
},
|
|
]
|
|
}
|