On 2 February 2015 at 14:46, Robbie Gemmell <[email protected]> wrote: > On 2 February 2015 at 13:08, Gordon Sim <[email protected]> wrote: >> On 01/30/2015 03:15 PM, Jakub Scholz wrote: >>> >>> So, I did some playing around. And it looks like the filter configured >>> this >>> way works fine with Qpid C++ broker, but doesn't really work with >>> ActiveMQ. >>> The filter seems to be present in the attach commands, but seems to be >>> ignored by the broker. >>> >>> 2015-01-30 16:00:50 [Protocol] trace >>> [19d9dcef-2e7c-4738-b549-e8a3c5737c22]: 0 -> @attach(18) >>> [name="queue://responseQueue_0dd729c8-6782-4380-affb-05ce401a75d3", >>> handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, >>> source=@source(40) [address="queue://responseQueue", durable=0, timeout=0, >>> dynamic=false, filter={:selector=@77567109365764 "status='licha'"}], >>> target=@target(41) [address="queue://responseQueue", durable=0, timeout=0, >>> dynamic=false], initial-delivery-count=0] >>> 2015-01-30 16:00:50 [Protocol] trace >>> [19d9dcef-2e7c-4738-b549-e8a3c5737c22]: 0 <- @attach(18) >>> [name="queue://responseQueue_0dd729c8-6782-4380-affb-05ce401a75d3", >>> handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, >>> source=@source(40) [address="queue://responseQueue", durable=0, >>> expiry-policy=:"session-end", timeout=0, dynamic=false, >>> filter={:selector=@77567109365764 "status='licha'"}], target=@target(41) >>> [address="queue://responseQueue"], incomplete-unsettled=false, >>> initial-delivery-count=0] >>> >>> Anyone has an idea why it doesn't work? The Java client seems to work fine >>> with the selector and ActiveMQ. >> >> >> ActiveMQ looks only at the name of the filter, not the descriptor of the >> value, and expects it to be 'jms-selector'. >> >> You can control that by being more explicit in the address, e.g.: >> >> my-queue; {link:{filter:{name:jms-selector, >> descriptor:'apache.org:selector-filter:string', value:'uniqueAppId=7'}}} >> >> ActiveMQ should really look at the descriptor, but we could also change the >> name/key the client uses by default since a compliant broker doesn't really >> care what that is anyway. >> >> > > It is also sending the filter on the attach response even though it > isnt using it (since it looks for it by key and didnt find it, it cant > be using it), which should also be corrected.
Raised as https://issues.apache.org/jira/browse/AMQ-5559, I will aim to take a look at it soon and get something in before the next release (after 5.11, which is due to finish its vote tonight). Robbie --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
