Clear the recently joined consumers when there are only one consumer under the Key_Shared subscription.
@@ -124,6 +124,9 @@ public class PersistentStickyKeyDispatcherMultipleConsumers extends PersistentDi
selector.removeConsumer(consumer);
if (recentlyJoinedConsumers != null) {
recentlyJoinedConsumers.remove(consumer);
+ if (consumerList.size() == 1) {
+ recentlyJoinedConsumers.clear();
+ }
}
}
