qpid-config does not provide any access to the "arguments" field of an exchange-bind operation. For the Headers exchange, the user must be able to specify an operator ('any' or 'all) and a set of key/value pairs. For the XML exchange, the user must be able to supply an XQuery document. This could be done via stdin or from an input file. It would probably be good to use a well-established convention (i.e. "-" for stdin or "-f <filename>" for an input file)
Fixed upstream in https://issues.apache.org/jira/browse/QPID-2327
Although the xlm exchange can be bound using both variants: cat /tmp/x.xml | qpid-config bind xml1 X Y -f - qpid-config bind xml1 X Y -f /tmp/x.xml There is problem with header exchange binding: [root@mrg-qe-01 bz636262]# qpid-config add queue X [root@mrg-qe-01 bz636262]# qpid-config add queue Y [root@mrg-qe-01 bz636262]# qpid-config bind xml1 X X -f /tmp/x.xml [root@mrg-qe-01 bz636262]# qpid-config bind xml2 Y X -f /tmp/x.xml [root@mrg-qe-01 bz636262]# qpid-config bind xml2 X -f /tmp/x.xml [root@mrg-qe-01 bz636262]# qpid-config bind head1 Y all k1=v1 Invalid args to bind headers: need 'any'/'all' plus conditions Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 Y k1=v1 Invalid args to bind headers: need 'any'/'all' plus conditions Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X k1=v1 Invalid args to bind headers: need 'any'/'all' plus conditions Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X any k1=v1,k2=v2 Invalid args to bind headers: need 'any'/'all' plus conditions Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X any k1=v1 k2=v2 Invalid condition arg to bind headers, need 'any' or 'all', not 'k1=v1' Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X any k1=v1, k2=v2 Invalid condition arg to bind headers, need 'any' or 'all', not 'k1=v1,' Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X all k1=v1, k2=v2 Invalid condition arg to bind headers, need 'any' or 'all', not 'k1=v1,' Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X all k1=v1,k2=v2 Invalid args to bind headers: need 'any'/'all' plus conditions Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 X all {k1=v1,k2=v2} Invalid condition arg to bind headers, need 'any' or 'all', not 'k1=v1' Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 Y all k1=v1,k2=v2 Invalid args to bind headers: need 'any'/'all' plus conditions Failed: ValueError: need more than 1 value to unpack [root@mrg-qe-01 bz636262]# qpid-config bind head1 Y all k1=v1, k2=v2 Invalid condition arg to bind headers, need 'any' or 'all', not 'k1=v1,' Failed: ValueError: need more than 1 value to unpack There seems to be no way how to bind headers exchange. Let me know if I'm missing there something. The source of commands above is from qpid-config --help & permutations/variations. -> ASSIGNED
The issue here is in the help-string/usage for qpid-config which says the following with regard to the "bind" operation: qpid-config [OPTIONS] bind <exchange-name> <queue-name> [binding-key] <for type xml> [-f -|filename] <for type header> [all|any] k1=v1 [, k2=v2...] For XML and Headers exchanges, the binding-key is not optional and must be supplied before the "any" or "all" keyword. In the above report, "all" is being interpreted as the binding key. The reason the binding key is required is that without it, the binding cannot be deleted. For XML and Headers exchanges, the binding key serves only as a handle by which a binding can be referred to.
I can confirm the above comment 4, testing with given <binding-key> works well. I believe qpid-config usage text should be modified or alternatively rel. note should describe this case.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Previously, qpid-config did not provide any access to the "arguments" field of an exchange-bind operation for header and xml exchanges. With this update, users can specify needed parameters for queue to header and/or xml exchange binding.
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -Previously, qpid-config did not provide any access to the "arguments" field of an exchange-bind operation for header and xml exchanges. With this update, users can specify needed parameters for queue to header and/or xml exchange binding.+Previously, qpid-config did not provide any access to the "arguments" field of an exchange-bind operation for header and xml exchanges because no binding key was set before the "any" or "all" keyword. With this update, users can specify needed parameters (...) for queue to header and/or xml exchange binding.
Covered by tech note, so moving to VERIFIED
Technical note updated. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. Diffed Contents: @@ -1 +1 @@ -Previously, qpid-config did not provide any access to the "arguments" field of an exchange-bind operation for header and xml exchanges because no binding key was set before the "any" or "all" keyword. With this update, users can specify needed parameters (...) for queue to header and/or xml exchange binding.+Previously, qpid-config did not provide any access to the "arguments" field of an exchange-bind operation for header and xml exchanges because no binding key was set before the "any" or "all" keyword. With this update, users can specify needed parameters for queue to header and/or xml exchange binding.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2010-0773.html