} else {
testMessage.setEnumField(TestEnum.SOME_OTHER_VALUE);
}
byte[] bytes;
try {
bytes = serializer.serialize(testMessage);
} catch(TException e) {
throw new RuntimeException("Failed to serialize message " + testMessage, e);
}
KeyedMessage<String, byte[]> data = new KeyedMessage<String, byte[]>(
mTopic, Integer.toString(i), bytes);