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

        Pavel Moravec created issue -
        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.
        Pavel Moravec made changes -
        Field Original Value New Value
        Attachment bz726687.patch [ 12536976 ]
        Rob Godfrey made changes -
        Labels patch addressing
        Hide
        Rajith Attapattu added a comment -

        Patch applied.

        Show
        Rajith Attapattu added a comment - Patch applied.
        Rajith Attapattu made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Rajith Attapattu [ rajith ]
        Fix Version/s 0.19 [ 12322452 ]
        Resolution Fixed [ 1 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        72d 10h 26m 1 Rajith Attapattu 28/Sep/12 22:46

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development