现在我可以使用这个发布消息
MqttServerClient client = MqttServerClient.withPort(broker, "", 1883); //connect broker
//create message
final builder = MqttClientPayloadBuilder();
builder.addString(message);
client.publishMessage(topic, MqttQos.atLeastOnce, builder.payload); //publish message
但是如何将发布的消息设置为保留。