在Client.php的onConnectionMessage的MQTTConst::CMD_PUBLISH添加$retain = $data['retain']; 然后在下面的call_user_func把retain傳回去
mqtt庫寫的好好,我這種php小白也能看懂