String bindingKey = String.valueOf(routingKey);
Map<String,Object> arguments = FieldTable.convertToMap(body.getArguments());
if(!virtualHost.getBindingFactory().addBinding(bindingKey, queue, exch, arguments))
{
Binding oldBinding = virtualHost.getBindingFactory().getBinding(bindingKey, queue, exch, arguments);
Map<String, Object> oldArgs = oldBinding.getArguments();
if((oldArgs == null && !arguments.isEmpty()) || (oldArgs != null && !oldArgs.equals(arguments)))
{
virtualHost.getBindingFactory().replaceBinding(oldBinding.getId(), bindingKey, queue, exch, arguments);
}
}
}
}
catch (AMQException e)