Uploaded image for project: 'OASIS Message Queuing Telemetry Transport (MQTT) TC'
  1. OASIS Message Queuing Telemetry Transport (MQTT) TC
  2. MQTT-76

Should "+" be allowed at the beginning of the topic filter in a subscription?

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.1
    • Component/s: core
    • Labels:
      None
    • Proposal:
      Hide

      4.5.1.3 Single level wildcard
      The plus sign ('+' 0x2B) is a wildcard character that matches only one topic level.

      The single-level wildcard can be used at any level in the topic filter, including first and last levels. Where it is used it MUST occupy an entire level of the filter. It can be used at more than one level in the topic filter and can be used in conjunction with the multilevel wildcard.

      [ First non-normative comment "For example, sport/tennis/+ matches...." unchanged ]

      Second non-normative comment has the following example added to cover the use of both + and # in a filter :

      • +/tennis/# is valid

      Note to editors: remove literal player names and replace with some other example e.g., playerA , playerB

      Show
      4.5.1.3 Single level wildcard The plus sign ('+' 0x2B) is a wildcard character that matches only one topic level. The single-level wildcard can be used at any level in the topic filter, including first and last levels. Where it is used it MUST occupy an entire level of the filter. It can be used at more than one level in the topic filter and can be used in conjunction with the multilevel wildcard. [ First non-normative comment "For example, sport/tennis/+ matches...." unchanged ] Second non-normative comment has the following example added to cover the use of both + and # in a filter : +/tennis/# is valid Note to editors: remove literal player names and replace with some other example e.g., playerA , playerB

      Description

      Draft09 says
      4.5.1.3 Single level wildcard
      The plus sign ('+' 0x2B) is a wildcard character that matches only one topic level.

      The single-level wildcard can be used at any level in the topic filter. It can be used in conjunction with the multilevel wildcard.
      It MUST be the only character between two topic level separators, or the last level, or on its own.

      The input Specification says:
      The single-level wildcard can be used at any level in the topic tree, and in
      conjunction with the multilevel wildcard. It must be used next to the topic level
      separator, except when it is specified on its own. Therefore, + and finance/+ are
      both valid, but finance+ is not valid. The single-level wildcard can be used at the
      end of the topic tree or within the topic tree. For example, finance/+ and
      finance/+/ibm are both valid.

      Apparently the intent of the input specification was to mean "either end of the topic tree" ie at the beginning or the end,
      hence +/finance would be a valid topic filter.

        Attachments

          Activity

            People

            • Assignee:
              andrew_banks Andrew Banks (Inactive)
              Reporter:
              andrew_banks Andrew Banks (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: