On 01/12/2012 08:38 PM, techguy911 wrote:
Thanks for the help.  I did have the 'all' for x-match but didn't copy/paste
correctly for this thread.  I updated my test to match what you suggested
and still don't see any data coming across.  Here's an updated set of
commands based on what you said:

./drain -f "testqueue; {create:receiver,
node:{x-declare:{arguments:{'qpid.policy_type':ring,
'qpid.max_size':500000000}},x-bindings:[{exchange:'amq.match',queue:'testqueue',key:'data1',arguments:{x-match:all,testkey:testval}}]}}"

./spout --content "testcontent" --property "testkey=testval" amq.match

What version are you using?

I suspect this is a problem with mismatched encodings. There is a bug in the spout client meaning that the properties set are actually sent through as binary data, whereas the binding arguments[1] are sent through as utf8.

A simple change to spout would address this (at least it does on trunk[1]):

Index: examples/messaging/spout.cpp
===================================================================
--- examples/messaging/spout.cpp        (revision 1230641)
+++ examples/messaging/spout.cpp        (working copy)
@@ -91,6 +91,7 @@
         std::string value;
         if (nameval(property, name, value)) {
             message.getProperties()[name] = value;
+            message.getProperties()[name].setEncoding("utf8");
         } else {
             message.getProperties()[name] = Variant();
         }
We've discussed making message properties default to utf8 in the past, I just haven't got around to making that change, You can always set it explicitly though.

[1] See https://issues.apache.org/jira/browse/QPID-3492 which was partially fixed for 0.14 with an additional fix recently on trunk for quoted values.


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to