[nats] url = "nats://localhost:4222" mode = "core" client = "serial-client" cluster = "tele-cluster" stream = "TELEGRAM" consumer = "telegram-consumer" [nats.stream_limits] max_msgs = 100000 max_bytes = 67108864 max_age = "24h" discard = "old" storage = "file" replicas = 1 [nats.consumer_rules] max_deliver = 5 ack_wait = "30s" max_ack_pending = 1024 deliver_policy = "all" replay_policy = "instant" backoff = ["5s", "30s", "2m"] start_sequence = 0 start_time = "" [subscription] topic = "telegram.serial" queue_group = "tele-queue" [publisher] topic = "telegram.json" [timeouts] server = "5s" reconnect_wait = "5s" close = "10s" ack_wait = "5s" [postgres] url = "postgres://user:password@localhost:5432/aviation?sslmode=disable" max_conns = 10 min_conns = 2 [app] batch_size = 50 batch_timeout = "2s" monitor_interval = "30s" [log] level = "info" format = "console" output = ["stdout", "file"] file = "logs/caatsm.log" # File rotation settings max_size = 100 # MB max_backups = 7 # Keep 7 rotated files max_age = 30 # Keep logs for 30 days compress = true # Compress old log files # Advanced options disable_caller = false disable_stacktrace = false development = false # Sampling configuration (optional, for high-volume scenarios) # [log.sampling] # initial = 100 # Log first 100 messages # thereafter = 100 # Then log every 100th message # tick = "1s" # Per second [telemetry] enabled = true endpoint = "localhost:4318" insecure = true [monitoring] disabled = false addr = ":2112" enable_metrics = true enable_health = true read_timeout = "5s" write_timeout = "5s" health_timeout = "2s" [dlq] enabled = true subject = "caatsm.dlq"