[Enhancement] Adjust batch size in dispatcher so that a single batch doesn't exceed managedLedgerMaxReadsInFlightSizeInMB
#23482
Labels
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Search before asking
Motivation
Current
managedLedgerMaxReadsInFlightSizeInMB
will have to be set to value that is higher thandispatcherMaxReadBatchSize
*maxMessageSize
.Otherwise it could result in error
Time-out elapsed while acquiring enough permits on the memory limiter to read from ledger [ledgerid], [topic], estimated read size [read size] bytes for [dispatcherMaxReadBatchSize] entries (check managedLedgerMaxReadsInFlightSizeInMB)
.dispatcherMaxReadBatchSize
defaults to100
andmaxMessageSize
defaults to5MB
in bytes.This means that currently
managedLedgerMaxReadsInFlightSizeInMB
must be set to500
or higher to prevent the issue from occurring in all cases.Solution
Adjust batch size in dispatcher so that a single batch doesn't exceed
managedLedgerMaxReadsInFlightSizeInMB
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: