I'm trying to do a QMF2 unbind
my code is:
private void unbind(String[] args) {
if (args.length < 2) {
usage();
}
String bindingIdentifier = args[0] + "/" + args[1];
if (args.length > 2) {
bindingIdentifier = bindingIdentifier + "/" + args[2];
}
Map arguments = new HashMap();
arguments.put("type", "binding");
arguments.put("name", bindingIdentifier);
System.out.println("unbind " + bindingIdentifier);
try {
broker.invokeMethod("delete", arguments);
} catch (QMFException e) {
System.out.println(e.getMessage());
}
}
but when I supply '' myqueue mykey
the binding identifier ends up /myqueue/mykey
when passed to the Broker.cpp class deleteObject method the name gets passed
to a BindingIdentifier object
struct BindingIdentifier
{
std::string exchange;
std::string queue;
std::string key;
BindingIdentifier(const std::string& name)
{
std::vector<std::string> path;
split(path, name, "/");
switch (path.size()) {
case 1:
queue = path[0];
break;
case 2:
exchange = path[0];
queue = path[1];
break;
case 3:
exchange = path[0];
queue = path[1];
key = path[2];
break;
default:
throw InvalidBindingIdentifier(name);
}
}
};
which doesn't seem to support a null first entry.
I can delete the binding OK with qpid-config, but that uses exchange_unbind
rather than QMF
Any thoughts? Is this a bug with BindingIdentifier?
Regards,
Fraser
--
View this message in context:
http://apache-qpid-users.2158936.n2.nabble.com/QMF2-unbind-doesn-t-seem-to-work-for-default-direct-exchange-tp6592501p6592501.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]