fix: pulsar use more memory for queue (#43565)

issue: #43564

Signed-off-by: chyezh <chyezh@outlook.com>
This commit is contained in:
Zhen Ye 2025-07-28 14:00:56 +08:00 committed by GitHub
parent 192521c6bd
commit 648994182f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -114,7 +114,8 @@ func (h *backlogClearHelper) getConsumer() (pulsar.Consumer, error) {
Topic: h.channelName.Name,
SubscriptionName: backlogClearHelperName,
Type: pulsar.Shared, // use shared subscription to avoid the subscription is rejected because of consumer exists.
MaxPendingChunkedMessage: 0,
MaxPendingChunkedMessage: 1, // We cannot set it to 0, because the 0 means 100.
ReceiverQueueSize: 1, // We cannot set it to 0, because the 0 means 1000.
StartMessageIDInclusive: true,
})
if err != nil {

View File

@ -146,7 +146,8 @@ func (w *walImpl) Truncate(ctx context.Context, id message.MessageID) error {
Topic: w.Channel().Name,
SubscriptionName: truncateCursorSubscriptionName,
Type: pulsar.Exclusive,
MaxPendingChunkedMessage: 0,
MaxPendingChunkedMessage: 1, // We cannot set it to 0, because the 0 means 100.
ReceiverQueueSize: 1, // We cannot set it to 0, because the 0 means 1000.
StartMessageIDInclusive: true,
})
if err != nil {