Description of problem: If no binding key for a XML exchange matches the routing key of incoming message, then QMF statistics of the exchange are not updated - while msgIn, msgDrop, byteIn and byteDrop should be updated. Version-Release number of selected component (if applicable): 0.18-14 How reproducible: 100% Steps to Reproduce: (using attached script - see ssn.sender("myxml/weather_wrong; .. differs from rxaddr += 'key: weather, ' and thus the message is to be dropped) service qpidd restart python xml_exchange_test.py qpid-stat -e | egrep '(xchang|=|myxml)' Actual results: Exchanges exchange type dur bind msgIn msgOut msgDrop byteIn byteOut byteDrop =========================================================================================== myxml xml 1 0 0 0 0 0 0 Expected results: Exchanges exchange type dur bind msgIn msgOut msgDrop byteIn byteOut byteDrop =========================================================================================== myxml xml 1 1 0 1 172 0 172 Additional info: This BZ assumes XML exchange runs xquery only for the bindings with binding key matching routing key of the message being processed - something I dont see a reason for, as the xquery should decide alone if the binding matches or not.
Created attachment 706551 [details] reproducer Slightly modified example from https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_MRG/2/html-single/Messaging_Programming_Reference/index.html#sect-XML_Exchange - just routing key in sent message is different.
Created attachment 708424 [details] Simple patch proposal If bindingsMap[routingKey].snapshot() is null, dont return XmlExchange::route() immediatelly but let call doRoute(msg, b); for empty BindingList b - it will just count the stats. Not sure if RWlock::ScopedRlock l(lock); makes further sense now, though.
Created attachment 712007 [details] Slightly modified patch to compile on current trunk Was reviewed and approved.
-> POST http://svn.apache.org/viewvc?view=revision&revision=1457924
Created attachment 781348 [details] Tar file containing test program source and test execution script.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-1296.html