// Now publish again with the same publisher. It should succeed and the consumer should receive the message.
publisher.prepare("test").add(Charsets.UTF_8.encode("Message 1"), 0).send().get();
Assert.assertEquals("Message 1", consumedMessages.poll(5, TimeUnit.SECONDS));
kafkaClient.stopAndWait();
zkClient.stopAndWait();
server.stopAndWait();
}
private Thread createPublishThread(final KafkaClient kafkaClient, final String topic,
final Compression compression, final String message, final int count) {