Improve topic comparer.

This commit is contained in:
Christian
2021-10-02 20:44:12 +02:00
parent 0920c86d37
commit db00682c75
13 changed files with 598 additions and 398 deletions
+1 -1
View File
@@ -55,7 +55,7 @@ namespace MQTTnet.TestApp.NetCore
ApplicationMessageInterceptor = new MqttServerApplicationMessageInterceptorDelegate(context =>
{
if (MqttTopicFilterComparer.IsMatch(context.ApplicationMessage.Topic, "/myTopic/WithTimestamp/#"))
if (MqttTopicFilterComparer.Compare(context.ApplicationMessage.Topic, "/myTopic/WithTimestamp/#") == MqttTopicFilterCompareResult.IsMatch)
{
// Replace the payload with the timestamp. But also extending a JSON
// based payload with the timestamp is a suitable use case.