YanshuoH commented on issue #25028:
URL: https://github.com/apache/pulsar/issues/25028#issuecomment-3595888084

   I do tried to reference the discussion 
https://github.com/apache/pulsar/discussions/23990 to tune the delayed messages.
   
   Forgot to paste my configuration:
   ```
     managedLedgerMaxUnackedRangesToPersist: "200000"
     managedLedgerMaxBatchDeletedIndexToPersist: "200000"
     managedLedgerPersistIndividualAckAsLongArray: "true"
     managedLedgerUnackedRangesOpenCacheSetEnabled: "true"
     persistentUnackedRangesWithMultipleEntriesEnabled: "true"
     delayedDeliveryTrackerFactoryClassName: 
"org.apache.pulsar.broker.delayed.BucketDelayedDeliveryTrackerFactory"
   ```
   
   For example, with these internal stats:
   ```
         "numberOfEntriesSinceFirstNotAckedMessage": 718613,
         "totalNonContiguousDeletedMessagesRange": 143483,
   ```
   
   My testing client can always confirm the slow dispatch:
   ```
   2025/12/01 18:26:27 received 482506 messages, 209 failures
   2025/12/01 18:26:42 received 482507 messages, 210 failures
   2025/12/01 18:26:57 received 482509 messages, 216 failures
   ```
   
   As you can see, the number of entries is suffit enough to deliver the 
message as my messages are with delay from 10s to 1h.
   And one strange thing is that the `numberOfEntriesSinceFirstNotAckedMessage` 
stays still even with more messages produced.
   Yet the message consumption is quite very slow with a few messages 
dispatched and most of the `failures` are receive timeout.
   
   Also I'd like to provide my client config:
   ```
        consumer, err := client.Subscribe(pulsar.ConsumerOptions{
                Topic:                       c.Topic,
                SubscriptionName:            c.Subscription,
                Type:                        pulsar.Shared,
                SubscriptionInitialPosition: 
pulsar.SubscriptionPositionEarliest,
                ReceiverQueueSize:           1,
                Name:                        uuid.NewString(),
                AckWithResponse:             true,
        })
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to