Polish lite pull consumer and fix bug (#1402)

1. Fix the problem of seek function blocking.
2. Fix shutdown function bug.
3. Make the code cleaner
4. Add unit test.
5. Fix seek bug
This commit is contained in:
King
2019-08-21 09:23:59 +08:00
committed by Heng Du
parent cfca4401d5
commit 4a4a464b25
8 changed files with 191 additions and 304 deletions
@@ -31,9 +31,7 @@ public class LitePullConsumerSubscribe {
try {
while (running) {
List<MessageExt> messageExts = litePullConsumer.poll();
if (messageExts != null) {
System.out.printf("%s%n", messageExts);
}
System.out.printf("%s%n", messageExts);
}
} finally {
litePullConsumer.shutdown();