Issue 1061: Consumers in failover subscription stops consuming after restart
@@ -238,6 +238,12 @@ public final class PersistentDispatcherSingleActiveConsumer extends AbstractDisp
@Override
protected void readMoreEntries(Consumer consumer) {
+ // consumer can be null when all consumers are disconnected from broker.
+ // so skip reading more entries if currently there is no active consumer.
+ if (null == consumer) {
+ return;
+ }
+
int availablePermits = consumer.getAvailablePermits();
if (availablePermits > 0) {
