Closed omegaphoenix closed 3 months ago
From the Apache Pulsar documentation:
Internally, the reader interface is implemented as a consumer using an exclusive, non-durable subscription to the topic with a randomly-allocated name.
By default we set subscriptions to use a durable cursor: https://github.com/streamnative/pulsar-rs/blob/master/PulsarApi.proto#L352
We only run into this when durable is None which can also be avoided if we use Pulsar::reader() which also sets durable to Some(false).
However, there are cases where users may overwrite the options before calling into_reader().
into_reader()
An example of how we could shoot ourselves in the foot without this change
From the Apache Pulsar documentation:
By default we set subscriptions to use a durable cursor: https://github.com/streamnative/pulsar-rs/blob/master/PulsarApi.proto#L352
We only run into this when durable is None which can also be avoided if we use Pulsar::reader() which also sets durable to Some(false).
However, there are cases where users may overwrite the options before calling
into_reader()
.