Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

To address (2), the producer currently maintains an expiry threshold for every topic, which is used to remove a topic from the working set at a future time (currently hard-coded to 5 minutes). While this works does work to reduce the size of the topic working set by evicting topics that are no longer in use, the producer will continue fetching metadata for these topics in every metadata request for the full expiry duration. This logic can be made more intelligent by managing the expiry from when the topic was last used, enabling the expiry duration to be reduced to improve cases where a lot large number of topics are touched intermittently. To control behavior, a configuration variable topic.expiry.ms should be added to the producer configuration.

...