-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmosquitto.conf
More file actions
59 lines (46 loc) · 1.85 KB
/
mosquitto.conf
File metadata and controls
59 lines (46 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# Standard MQTT listener
listener 1883
# WebSocket listener for browser clients
listener 9001
protocol websockets
# MQTT over TLS listener
listener 8883
#certfile /mosquitto/security/server.crt
#keyfile /mosquitto/security/server.key
socket_domain ipv4
# If left unset, the default of allowing TLS v1.3 and v1.2
#tls_version tlsv1.3
# Configuration for client authentication with PKI (clients' certificates must be signed by the DFS CA represented by ca.crt)
#cafile /mosquitto/security/ca.crt
#require_certificate true
allow_anonymous false
per_listener_settings false
plugin /usr/lib/mosquitto_dynamic_security.so
plugin_opt_config_file /mosquitto/config/dynsec.json
plugin /usr/lib/libsql_plugin.so
# Exclude topics from being persisted to the database (comma-separated, supports MQTT wildcards + and #)
# Example: plugin_opt_exclude_topics cmd/#,test/exclude/#
#plugin_opt_exclude_topics
# Batch insert configuration for performance tuning
plugin_opt_batch_size 100
plugin_opt_flush_interval 50
# Data retention: automatically delete messages older than N days (0 = disabled)
plugin_opt_retention_days 365
# Exclude MQTT message headers from being stored in the database (comma-separated list of header names, case-insensitive)
# Example: plugin_opt_exclude_headers header-to-exclude,another-header-to-exclude
# Use '#' to disable headers storage completely
#plugin_opt_exclude_headers
persistence true
persistence_location /mosquitto/data
# Save each single change (subscription changes, retained messages received and queued messages) immediately - TOO AGGRESSIVE
#autosave_interval 1
#autosave_on_changes true
# Save every 3 seconds if there were any changes - LESS AGGRESSIVE
autosave_interval 3
autosave_on_changes false
connection_messages true
user admin
log_type information
log_dest stdout
log_dest file /mosquitto/log/mosquitto.log
log_timestamp_format %Y-%m-%dT%H:%M:%S