在Client.php的onConnectionMessage的MQTTConst::CMD_PUBLISH添加$retain = $data['retain']; 然后在下面的call_user_func把retain传回去
mqtt库写的好好,我这种php小白也能看懂