mochi-mqtt / server

The fully compliant, embeddable high-performance Go MQTT v5 server for IoT, smarthome, and pubsub
MIT License
1.29k stars 222 forks source link

MessageExpiry Hook #403

Open aixj1984 opened 6 months ago

aixj1984 commented 6 months ago

5.0里面有消息过期的设置,但是如果消息真过期了,没有对外的Hook函数

aixj1984 commented 6 months ago

Sorry, OnQosDropped 能够支持这个

aixj1984 commented 3 months ago

OnQosDropped 是在客户单订阅情况下的过期回调,那如果发布的消息,到期一致没有人订阅,是使用这个hook么,OnPublishDropped,当前测试无效

aixj1984 commented 3 months ago

非保留消息,OnRetainedExpired 这个有用么

aixj1984 commented 3 months ago

我这边的述求是想处理已经发布的消息,到期没人订阅后的回调

aixj1984 commented 2 months ago

Publish a message with an expiration time; if the message is never subscribed to, how can the expiration event of this message be captured?

aixj1984 commented 2 months ago

为什么在OnQosComplete里面,原包信息没有返回,这样信息完成后,都没法直接关联