mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Improve topic comparer.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user