Demogorgon314 opened a new issue, #18229: URL: https://github.com/apache/pulsar/issues/18229
### Motivation Currently, the table view only supports persistent topics with read compacted. However, some data don't require persistent storage, like load data in PIP-192 [#16691](https://github.com/apache/pulsar/issues/16691). We need to support non-persistent topic read for table view and introduce the TTL for the non-persistent topic to delete the old data. ### Goal - Support non-persistent topics for table view - Add TTL for non-persistent topic data in the table view. ### API Changes ```java public interface TableViewBuilder<T> { // ... /** * Set key to expire after written TTL, * the TTL configuration only supports when using the non-persistent topic. * * @param ttl The key time to live. * @param unit The ttl unit. * @return The {@link TableViewBuilder} builder instance */ TableViewBuilder<T> ttl(int ttl, TimeUnit unit); } ``` ### Implementation The data will store in a caffeine cache. We can easily use `expireAfterWrite` API to add TTL support. ### Alternatives N/A ### Anything else? No response -- 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]
