-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmosquitto.conf
36 lines (33 loc) · 957 Bytes
/
mosquitto.conf
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
# Config file for mosquitto
retry_interval 20
sys_interval 10
store_clean_interval 10
user root
max_inflight_messages 40
max_queued_messages 200
queue_qos0_messages false
message_size_limit 0
allow_zero_length_clientid true
persistent_client_expiration 3m
allow_duplicate_messages false
autosave_interval 60
autosave_on_changes false
persistence true
persistence_file mosquitto.db
persistence_location /var/lib/mosquitto/
log_dest stderr
log_type all
connection_messages true
log_timestamp true
include_dir /etc/mosquitto.d/
auth_opt_backends postgres
auth_plugin /etc/mosquitto/auth-plug.so
auth_opt_host db
auth_opt_port 5432
auth_opt_dbname mqtt
auth_opt_user mqtt
auth_opt_pass 123456A!
auth_opt_userquery SELECT password FROM account WHERE username = $1 limit 1
auth_opt_superquery SELECT COALESCE(COUNT(*),0) FROM account WHERE username = $1 AND super = 1
auth_opt_aclquery SELECT topic FROM acls WHERE (username = $1) AND (rw >= $2)
listener 1883