Closed MikeDombo closed 9 months ago
It seems this can happen when a message is sent with the duplicate flag, but the original message was successfully sent to all subscribed clients. In this case the failedClients
Set is empty and as a result the collector collects no actions.
The other way this can happen is if a dup message is sent, but all failed clients have since un-subscribed from the topic. In this case filterClients is not empty, but there are no matches between the subscription list and the filterClients Set.
Your fix looks good to me.
oh,,,It's happened on my application.
This change is attempting to resolve #750 where the call to
retain
is 0 and thereforecountBatches
must have returned 0. I know that this change will absolutely avoid the error, however, I'm not clear on why the number of batches would be 0 while this code is running. In this change, I simply treat it exactly the same as the above case where there are no subscriptions (and thus no work to do).