LongCounter messages_sent = new LongCounter(0);
LongCounter messages_received = new LongCounter(0);
int subscription_count = 0;
public MqttConnectionStatusDTO create_connection_status(boolean debug) {
MqttConnectionStatusDTO rc = new MqttConnectionStatusDTO();
rc.protocol_version = "3.1";
rc.messages_sent = messages_sent.get();
rc.messages_received = messages_received.get();
rc.subscription_count = subscription_count;
rc.waiting_on = status.apply();