Showing
1 changed file
with
6 additions
and
1 deletions
@@ -85,7 +85,12 @@ public abstract class AbstractTbQueueConsumerTemplate<R, T extends TbQueueMsg> i | @@ -85,7 +85,12 @@ public abstract class AbstractTbQueueConsumerTemplate<R, T extends TbQueueMsg> i | ||
85 | subscribed = true; | 85 | subscribed = true; |
86 | } | 86 | } |
87 | 87 | ||
88 | - List<R> records = doPoll(durationInMillis); | 88 | + List<R> records; |
89 | + if (partitions.isEmpty()) { | ||
90 | + records = Collections.emptyList(); | ||
91 | + } else { | ||
92 | + records = doPoll(durationInMillis); | ||
93 | + } | ||
89 | if (!records.isEmpty()) { | 94 | if (!records.isEmpty()) { |
90 | List<T> result = new ArrayList<>(records.size()); | 95 | List<T> result = new ArrayList<>(records.size()); |
91 | records.forEach(record -> { | 96 | records.forEach(record -> { |