Qpid
  1. Qpid
  2. QPID-4146

JMS client: node binding not created for topic node

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.14
    • Fix Version/s: 0.19
    • Component/s: Java Client
    • Labels:

      Description

      When creating a topic (an exchange in qpid terminology) with x-bindings within node: scope, the binding is not created. See this simple reproducer:

      qpid-config add queue q
      export CLASSPATH=$(find "/usr/share/java/" -name '*.jar' | tr '\n' ":")
      cd /usr/share/doc/qpid-java-0.14/examples
      ./run_example.sh org.apache.qpid.example.Spout --content="msg1" "ex/key;{ create: always, node: { type: topic, x-bindings: [

      { exchange:'ex', queue: 'q', key: 'key' }

      ]}}"

      qpid-config exchanges -b then shows no binding from 'ex' exchange.

      Simple patch to be attached.

      1. bz726687.patch
        1 kB
        Pavel Moravec

        Activity

        Hide
        Pavel Moravec added a comment -

        See client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java file:
        sendQueueBind method (that invokes getQpidSession().exchangeBind method for requesting the binding to be created) is called from handleAddressBasedDestination just for AMQDestination.QUEUE_TYPE case. I.e. only when the node is queue type and not topic.

        The call of the sendQueueBind method should be irrelevant whether the node is queue or topic and whether the node already exists or not. It should be called only when the create: policy evaluates to true.

        Show
        Pavel Moravec added a comment - See client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java file: sendQueueBind method (that invokes getQpidSession().exchangeBind method for requesting the binding to be created) is called from handleAddressBasedDestination just for AMQDestination.QUEUE_TYPE case. I.e. only when the node is queue type and not topic. The call of the sendQueueBind method should be irrelevant whether the node is queue or topic and whether the node already exists or not. It should be called only when the create: policy evaluates to true.
        Hide
        Rajith Attapattu added a comment -

        Patch applied.

        Show
        Rajith Attapattu added a comment - Patch applied.

          People

          • Assignee:
            Rajith Attapattu
            Reporter:
            Pavel Moravec
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development