# Config file for mosquitto
#
# See mosquitto.conf(5) for more information.
#
# This is a very basic configuration (no security etc - do not use in production!)
# If you are using this to replicate a bug please copy your own configuration in here (changing folders as necessary)

allow_anonymous true # Anyone can connect

# Port to use for the default listener.
#port 1883

#log_type error
#log_type warning
#log_type notice
#log_type information
log_type all

# Log to the console (visible using `docker-compose logs`). To log to a file uncomment the line below
log_dest stdout
#log_dest file /mosquitto/log/mosquitto.log

# Log entries are easier to read with an ISO 8601 timestamp
log_timestamp true
log_timestamp_format %Y-%m-%dT%H:%M:%S

# For demonstration purposes we will not store messages to disk (the appropriate value depends upon what you are testing)
# Note: If enabled then you will probably want to add a bind to the docker-compose.yml so the persistence_file is retained.
#persistence false

#persistence true
#autosave_interval 20
#persistence_location /mosquitto/data/
#persistence_file mosquitto.db

# The maximum number of QoS 1 and 2 messages to hold in a queue per client
# above those that are currently in-flight.  Defaults to 100. Set
# to 0 for no maximum (not recommended).
# We do set this to 0 for testing because the default is may result in lost messages if there are a lot of
# messages waiting when the connection is re-established (they will all be sent immediately). This should not be
# 0 on a production system (but the value chosen should take into account likely queue sizes and bandwidth)
max_queued_messages 0


