clientProperties.setProperty(ClientConfig.CLIENT_TYPE, "sync");
SuroClient client = new SuroClient(clientProperties);
for (int i = 0; i < 10; ++i) {
client.send(new Message("topic1", Integer.toString(i).getBytes()));
}
for (int i = 0; i < 5; ++i) {
client.send(new Message("topic2", Integer.toString(i).getBytes()));
}
for (int i = 0; i < 20; ++i) {
client.send(new Message("topic3", Integer.toString(i).getBytes()));
}
for(int i = 0; i < 30; ++i) {
Map<String, Object> message = makeMessage("foo/bar", "value"+i);
client.send(new Message("topic4", jsonMapper.writeValueAsBytes(message)));
}
int count = 10;
while (!answer() && count > 0) {
Thread.sleep(1000);