Open mtmk opened 1 month ago
What happens if they use MaxBytes instead? Won't the channel be 1024 again and it will pull through all of the messages until it is full again?
Should we introduce an intermediate channel that consumes the full pull, then calls for the next pull after it is half way consumed?
The capacity now has a limit set to
maxMsgs
to prevent pulling excessive messages from the server. It also has been bounded to a maximum of 1024 to avoid large object heap allocations.Program.cs
Publish messages:
Before: Consumes all the data exceeding
maxMsgs
After: Consumes limited to
maxMsgs
and a few more (1 or 2 pull requests worth) due to pre-fetch optimization.