for use with replay_mqtt