ProducerConfig config = new ProducerConfig(properties);
Producer<String, byte[]> producer = new Producer<String, byte[]>(config);
TSerializer serializer = new TSerializer(new TBinaryProtocol.Factory());
for (int i = 0; i < mNumMessages; ++i) {
TestMessage testMessage = new TestMessage(System.currentTimeMillis() * 1000000L + i,
"some_value_" + i);
if (i % 2 == 0) {
testMessage.setEnumField(TestEnum.SOME_VALUE);
} else {
testMessage.setEnumField(TestEnum.SOME_OTHER_VALUE);
}
byte[] bytes;
try {
bytes = serializer.serialize(testMessage);
} catch(TException e) {