for (Binding binding : bindings.getBindings())
{
if (binding instanceof LocalQueueBinding && local || binding instanceof RemoteQueueBinding && !local)
{
QueueBinding qBinding = (QueueBinding)binding;
bindingCount++;
totConsumers += qBinding.consumerCount();
}
}
if (bindingCount == expectedBindingCount && totConsumers == expectedConsumerCount)
{
return;
}
Thread.sleep(10);
}
while (System.currentTimeMillis() - start < ClusterTestBase.WAIT_TIMEOUT);
String msg = "Timed out waiting for bindings (bindingCount = " + bindingCount +
" (expecting " +
expectedBindingCount +
") " +
", totConsumers = " +
totConsumers +
" (expecting " +
expectedConsumerCount +
")" +
")";
log.error(msg);
Bindings bindings = po.getBindingsForAddress(new SimpleString(address));
System.out.println("=======================================================================");
System.out.println("Binding information for address = " + address + " on node " + node);
for (Binding binding : bindings.getBindings())
{
if (binding instanceof LocalQueueBinding && local || binding instanceof RemoteQueueBinding && !local)
{
QueueBinding qBinding = (QueueBinding)binding;
System.out.println("Binding = " + qBinding + ", queue=" + qBinding.getQueue());
}
}
StringWriter writer = new StringWriter();
PrintWriter out = new PrintWriter(writer);