@Test
public void testSyncConsume() throws MetaClientException, InterruptedException {
final SimpleHttpConsumer client = new SimpleHttpConsumer(new HttpClientConfig("localhost", 8080));
MessageIterator it = null;
// get messages
long syncOffSet = this.offset;
while ((it = client.get("meta-test", new Partition(1, 1), syncOffSet, 99999)) != null) {
while (it.hasNext()) {
final Message msg = it.next();
logger.info("Receive message:" + new String(msg.getData()));
logger.info("message attribute:" + msg.getAttribute());
}
syncOffSet += it.getOffset();
}
}