Open wootapa opened 1 month ago
That's what I've used but InterceptingPublishAsync fires once per message. I would like to filter each message once per client, so I can reject based on client conditions. Possible?
I'm not sure if this is possible...
use server.InterceptingClientEnqueueAsync
That's the one. Thanks.
I also looked through the code to find a way to limit the retained messages upon subscription, but they seem filtered only based on the topic here MqttClientSubscription.FilterRetainedApplicationMessages
https://github.com/dotnet/MQTTnet/blob/e18a91a4b59bc312aa9acf9be575401d07b793e4/Source/MQTTnet/Server/Internal/MqttClientSubscriptionsManager.cs#L462
It could possibly make sense to also have a hook here, basically doing the same thing as in server.InterceptingClientEnqueueAsync
as a way to opt out for a specific message. What do you think?
Trying to find the server event in version 4, that is the equivalent of what is mentioned here: https://github.com/dotnet/MQTTnet/issues/1467, but I cant find anything. I would like to intercept messages based on the receiving client. Could you give a hint?