Rationale:- The pollCount was getting incremented on each poll and it will be as max Pollcount after 100th poll. So after that even if we poll for 1, the queue will poll for 100 and return only 1. This leaves 99 entries in memory. This can cause nondeterministic behavior if the server goes down after this.
Rationale:- The pollCount was getting incremented on each poll and it will be as max Pollcount after 100th poll. So after that even if we poll for 1, the queue will poll for 100 and return only 1. This leaves 99 entries in memory. This can cause nondeterministic behavior if the server goes down after this.