# Configuration Mosquitto pour Skull Pi
# Fichier: /etc/mosquitto/conf.d/skull.conf

# Listener principal sur localhost
listener 1883 127.0.0.1

# Authentification désactivée pour le développement local
allow_anonymous true

# Persistance des messages
persistence true
persistence_location /var/lib/mosquitto/

# Configuration des logs
log_type error
log_type warning
log_type notice
log_type information
log_timestamp true
log_dest file /var/log/mosquitto/mosquitto.log

# Taille maximum des messages (64KB)
message_size_limit 65536

# Configuration des retained messages
max_inflight_messages 20
max_queued_messages 100
persistent_client_expiration 2h

# Configuration pour WebSocket (optionnel)
# listener 9001
# protocol websockets

# Heartbeat
keepalive 60

# Configuration pour les QoS
max_qos 2

# Délai de connexion
connection_messages true
log_type subscribe
log_type unsubscribe