dotnet / MQTTnet

MQTTnet is a high performance .NET library for MQTT based communication. It provides a MQTT client and a MQTT server (broker). The implementation is based on the documentation from http://mqtt.org/.
MIT License
4.49k stars 1.07k forks source link

Event when pending ApplicationMessage was published #2008

Open AlanMcInally opened 5 months ago

AlanMcInally commented 5 months ago

Describe the feature request

I would like to have an event on managed client to be triggered, if a pending message was published.

Which project is your feature request related to?

Describe the solution you'd like

In my application, I want to display the count of pending application messages of unmanged client. I do not want to read Property PendingApplicationMessagesCount continously. I think it would be nicer to be informed by an event.

chkr1011 commented 5 months ago

Please try event ApplicationMessageProcessedAsync. If the exception is null, the processing was successful and the message is properly published.