Note we treat "a.b.c.*.*" and "a.b.c" as not a match at this stage, since the wildcard is attempting to match more levels than exist in the topic. if this proves to be unpopular with the masses, its a very trivial change below to fix this problem.
Tokens are compared and must either be identical or the wildcard token must be a "*" to match at this level. Once a mismatch is detected the comparison is stopped and a false returned.
NOTE: This check assumes both the topic and wildcard topic have both already been validated. if the topics are inavlid this test can return arbitrary results. @param destination The specific topic to match to @return True if the wildcard matches.
|
|