Qpid
  1. Qpid
  2. QPID-4558

Implement Selector support in C++ broker

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Issue Links

        Activity

        Hide
        Andrew Stitcher added a comment -

        I have checked in a major piece of this work into trunk into r1452522, r1452523, r1452524, r1452525

        This adds selector support into the 0-10 and 1-0 protocols for the C++ messaging client and broker code (0-10: r1452522 & 1-0: r1452524) and implements a usable fraction of the selector language: r1452523, r1452525.

        Show
        Andrew Stitcher added a comment - I have checked in a major piece of this work into trunk into r1452522, r1452523, r1452524, r1452525 This adds selector support into the 0-10 and 1-0 protocols for the C++ messaging client and broker code (0-10: r1452522 & 1-0: r1452524) and implements a usable fraction of the selector language: r1452523, r1452525.
        Hide
        Andrew Stitcher added a comment - - edited

        The implemented selector language follows the spec in:
        https://svn.apache.org/repos/asf/qpid/trunk/qpid/specs/apache-filters.xml#type-selector-filter so is not precisely identical to the JMS selector language (the special property identifiers are different, but mechanically translatable I think).

        The language implemented currently in these changes includes:

        • All the JMS value types: exact numerics (ints), approximate numerics (floating point), strings and booleans.
        • All the comparison operators (=,<>,<,>,<=,>=)
        • Boolean operators:
          • AND
          • OR
          • NOT
          • IS NULL
          • IS NOT NULL
        • Parenthesised expressions
        • Working special identifiers:
          • amqp.delivery_mode
          • amqp.priority
          • amqp.redelivered

        This set of changes should include all the new files and "infrastructure" change necessary for the selector implementation in the C++ code. Further work should only need to change these or existing files.

        Show
        Andrew Stitcher added a comment - - edited The implemented selector language follows the spec in: https://svn.apache.org/repos/asf/qpid/trunk/qpid/specs/apache-filters.xml#type-selector-filter so is not precisely identical to the JMS selector language (the special property identifiers are different, but mechanically translatable I think). The language implemented currently in these changes includes: All the JMS value types: exact numerics (ints), approximate numerics (floating point), strings and booleans. All the comparison operators (=,<>,<,>,<=,>=) Boolean operators: AND OR NOT IS NULL IS NOT NULL Parenthesised expressions Working special identifiers: amqp.delivery_mode amqp.priority amqp.redelivered This set of changes should include all the new files and "infrastructure" change necessary for the selector implementation in the C++ code. Further work should only need to change these or existing files.
        Hide
        Andrew Stitcher added a comment - - edited

        There are a number of issues still outstanding with this initial implementation:

        • The language support is incomplete:
          • Numeric operators are required (+,-,*,/)
          • LIKE boolean operator is required
          • BETWEEN and IN operators are required (they are syntactic sugar though so can be worked around)
        • The special identifier support is incomplete, this is largely because of missing support in the broker message code.
        • The amqp 1.0 message code currently only has stub implementations of the code to extract properties, so most selectors aren't useful on amqp 1.0 messages yet.
        • The underlying broker message code does not extract boolean properties correctly and treats them as integers.

        Separate sub-tasks and issues will be opened for these missing pieces.

        Show
        Andrew Stitcher added a comment - - edited There are a number of issues still outstanding with this initial implementation: The language support is incomplete: Numeric operators are required (+,-,*,/) LIKE boolean operator is required BETWEEN and IN operators are required (they are syntactic sugar though so can be worked around) The special identifier support is incomplete, this is largely because of missing support in the broker message code. The amqp 1.0 message code currently only has stub implementations of the code to extract properties, so most selectors aren't useful on amqp 1.0 messages yet. The underlying broker message code does not extract boolean properties correctly and treats them as integers. Separate sub-tasks and issues will be opened for these missing pieces.
        Hide
        Andrew Stitcher added a comment -

        Property extraction for different types and for amqp 1.0 properties now work correctly

        So I have changed the status of this work from experimental and started using the registered filter extension for amqp 1.0.

        The address syntax for specifying selectors has changed too; it now uses plain "selector" as the link property to specify a selector eg:

        queue; {link:{selector:"colour in ('green', 'red', 'blue')"}}
        
        Show
        Andrew Stitcher added a comment - Property extraction for different types and for amqp 1.0 properties now work correctly So I have changed the status of this work from experimental and started using the registered filter extension for amqp 1.0. The address syntax for specifying selectors has changed too; it now uses plain "selector" as the link property to specify a selector eg: queue; {link:{selector:"colour in ('green', 'red', 'blue')"}}

          People

          • Assignee:
            Andrew Stitcher
            Reporter:
            Andrew Stitcher
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development