<@U078Y59KC3B> What information is kept in memory ...
# ask-ai
t
@RunLLM What information is kept in memory for delayed messages?
r
For delayed messages in Pulsar, the in-memory structure (InMemoryDelayedDeliveryTracker) stores a mapping of delivery timestamps to ledger IDs and entry IDs, using a nested map and Roaring64Bitmap for efficient storage. Specifically, it keeps: (1) the delivery timestamp (bucketed for memory efficiency), (2) the ledger ID, and (3) the entry ID of each delayed message. This allows the broker to track when each message should be delivered without reading from storage until necessary. The structure is designed to minimize memory usage and supports efficient lookup and removal as messages become eligible for delivery. See InMemoryDelayedDeliveryTracker.java and PR 23611 for details. Would you like more detail on the data structure or memory optimization techniques? Sources: - InMemoryDelayedDeliveryTracker.java - PR 23611 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
t
@RunLLM What are the values for the broker configuration field
delayedDeliveryTrackerFactoryClassName
?
r
The
delayedDeliveryTrackerFactoryClassName
broker configuration field can be set to either
org.apache.pulsar.broker.delayed.InMemoryDelayedDeliveryTrackerFactory
(the default, in-memory implementation) or
org.apache.pulsar.broker.delayed.BucketDelayedDeliveryTrackerFactory
(bucket-based, persistent implementation). These control which delayed message tracker is used by the broker. See ServiceConfiguration.java and Pulsar delayed message delivery docs. Would you like more detail on the differences between these implementations? Sources: - ServiceConfiguration.java - Pulsar delayed message delivery docs 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
t
@RunLLM What happens when the limit of
delayedDeliveryMinIndexCountPerBucket
is reached?
r
When the
delayedDeliveryMinIndexCountPerBucket
limit is reached, and all message indexes of the current ledger have been added to the tracker, the current bucket is sealed. This means the bucket is closed for further additions and a new bucket will be started for subsequent delayed messages. See ServiceConfiguration.java. Would you like more detail on the sealing process or its impact? Sources: - ServiceConfiguration.java 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.