while (messagesCount-- > 0)
{
senderSpeedLimit.accure();
facade.publishMessage(sendTopics.get(rnd.nextInt(sendTopics.size())), (new BenchmarkMessage(id + messagesCount)).send());
}
//Sending poison pills
for (Identifier t : allTopics)
{
facade.publishMessage(t, (new BenchmarkMessage(0, true)).send());
}
finishLatch.countDown();
}
catch (Throwable t)