@Override
public void run() {
hasStarted = true;
for (int i = 0; i < multipler; i++) {
MessageBuildSendable sendable = MessageBuilder.createMessage()
.toSubject("StressTestService")
.withValue(messageValue)
.done()
.repliesTo(new MessageCallback() {
@Override
public void callback(Message message) {
stats.registerReceivedMessage(message);
statsPanel.updateStatsLabels(stats);
}
});
sendable.sendNowWith(bus);
stats.registerSentMessage(sendable.getMessage());
}
statsPanel.updateStatsLabels(stats);
}