Skip to content

MqttTopic isMatched method, some case result is not correct. #125

@wangdaowangdao

Description

@wangdaowangdao

image
image

  1. As shown above, I think topicFilter should match topicName, but isMatched method returns false.

topicFilter = finance/stock/+/#
topicName = finance/stock/ibm
isMatched = false

image
image
2. In this case, isMatched' method is right.

topicFilter = finance/stock/+
topicName = finance/stock/ibm
isMatched = true

  1. As shown above, i found if topicFilter' length is longer than topicName's length and topicFilter contains "+" and "#", the result is always false, even if the topicFiler except for "#" match topicName.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions