merlimat commented on pull request #6787: URL: https://github.com/apache/pulsar/pull/6787#issuecomment-620142566
> I think this is the minimum requirement that a reader should provide. > But a flag should be added to enable this and the default behavior is that the data shouldn't be removed if there is a reader is active. As I explained above, this is not how the reader works right now. And there is no way to "guarantee" that behavior right now. I don't think a flag would change that. Supporting by default a "half" guarantee doesn't give anything that an application could rely upon. > If a reader is active on a stream, the data after the reader position shouldn't be deleted The definition of active is tricky. Since by definition the reader is tied to the TCP connection. If one needs a stronger retention semantic, it should be using a "subscription" instead. To be clear, the behavior of the Pulsar reader was modeled over the Kafka consumer where the same scenario happens: data is deleted irrespectively of whether consumers are still consuming or not. If we want to change the implementation of the Pulsar topic reader to support a different semantic that today (eg: guaranteed data for the reader), that would be a longer discussion and it would involve a re-design of the reader that would have to be a "durable" resource instead of an ephemeral one. In my view, at that point we'd be essentially looking at an exclusive subscription with very tiny semantic differences. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org