You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org> on 2011/06/20 19:30:48 UTC

[jira] [Commented] (QPID-3265) Can't subscribe to headers exchange using address (rather than BURL)

    [ https://issues.apache.org/jira/browse/QPID-3265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13052089#comment-13052089 ] 

jiraposter@reviews.apache.org commented on QPID-3265:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/937/
-----------------------------------------------------------

Review request for qpid.


Summary
-------

The patch makes the following changes

1. AMQSession_0_10.java
   A default binding is only added if there are no explicit bindings specified via x-bindings

2. BasicMessageConsumer_0_10.java
   When the same destination (Topic) is used to create two different consumers the code creates a copy of the destination to ensure the second consumer gets it's own unique temp queue. When doing so we need to ensure we delete any bindings for the previous temp queue. If we don't remove old bindings and if there were no explicit bindings specified via x-bindings, then the second consumers queue will not be bound due to the logic mentioned in [1]. (Bcos the previous binding is treated as explicit bindings).

3. AddressHelper.java
   The second part of the JIRA covers a different bug - i.e x-binding specified in the link properties are not used if the node type if a queue.
    I added code to read the x-bindings in link props if there are no x-bindings specified in the node props.

4. Modified test cases
    1. To ensure that a default binding is not added when explicit bindings are specified.
    2. To fix an existing test case that relied on a default binding even when x-bindings is specified.
(*) I still need to add (or modify an existing test case) to cover the case where x-bindings are specified in link props when the node type if a queue.


This addresses bug QPID-3265.
    https://issues.apache.org/jira/browse/QPID-3265


Diffs
-----

  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession_0_10.java 1137691 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/BasicMessageConsumer_0_10.java 1137691 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/src/main/java/org/apache/qpid/client/messaging/address/AddressHelper.java 1137691 
  http://svn.apache.org/repos/asf/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java 1137691 

Diff: https://reviews.apache.org/r/937/diff


Testing
-------

The use cases specified in the JIRA were manually tested in addition to the above mentioned automated test cases.


Thanks,

rajith



> Can't subscribe to headers exchange using address (rather than BURL)
> --------------------------------------------------------------------
>
>                 Key: QPID-3265
>                 URL: https://issues.apache.org/jira/browse/QPID-3265
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: 0.10
>         Environment: java 0.10 client
>            Reporter: Gordon Sim
>            Assignee: Rajith Attapattu
>
> Creating a receiver for the following address works from python and c++, but not from JMS (using drain example in each case):
>   my-headers-exchange; {link:{x-bindings:[{arguments:{'x-match':all,a:b,c:d}}]}}
> The problem with JMS seems to be that though it correctly interprets the arguments and issues a bind with them in it, it issues another bind to the exchange with no arguments that fails with an error.
> Also, the following also doesn't work:
>   my-subscription-queue; {create:always, node:{x-declare:{auto-delete:True}}, link:{x-bindings:[{queue:my-subscription-queue, exchange:my-headers-exchange, arguments:{'x-match':all,a:b,c:d}}]}}
> Here the x-bindings in the link don't seem to get interpreted. However if instead they are moved to the node, that works.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org