This is the default used by the Mosquitto tools. The new define makes
it possible to easily override this at compile time.
#define MQTT_DEFAULT_PORT 1883
#define MQTT_DEFAULT_TOPIC_PREFIX "collectd"
#define MQTT_DEFAULT_TOPIC "collectd/#"
+#ifndef MQTT_KEEPALIVE
+# define MQTT_KEEPALIVE 60
+#endif
+
/*
* Data types
}
status = mosquitto_connect (conf->mosq, conf->host, conf->port,
- /* keepalive = */ 10, /* clean session = */ conf->clean_session);
+ /* keepalive = */ MQTT_KEEPALIVE, /* clean session = */ conf->clean_session);
if (status != MOSQ_ERR_SUCCESS)
{
char errbuf[1024];