我目前正在使用 Smallrye 反应式消息传递与 Quarkus 发送 Mqtt 消息,问题是当我将保留标志添加为 true 时,没有任何变化。
这是我的做法:
@Broadcast
@Channel("myChannel")
Emitter<MyObject> emitter;
emitter.send(MqttMessage.of("/mytopic",data,MqttQoS.EXACTLY_ONCE,true));
任何帮助或指导将不胜感激
尝试使用 io.smallrye.reactive.messaging.mqtt.SendingMqttMessage 来构建您的消息。