Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-20 Thread Zike Yang
> Regarding "+1 to throw this exception in future versions." - this means you complete this issue once it throws an exception right? More precisely, I mean we could print warning logs in the next feature release 3.0.0, and throw exceptions in 3.1.0. We better give users time to transition and modi

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-16 Thread Asaf Mesika
Regarding "+1 to throw this exception in future versions." - this means you complete this issue once it throws an exception right? On Wed, Feb 15, 2023 at 8:54 AM Zike Yang wrote: > > if we change the default > subscription mode to be non-durable for non-persistent topics, then what > will happ

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-14 Thread Zike Yang
> if we change the default subscription mode to be non-durable for non-persistent topics, then what will happen to users who previously had durable subscriptions on that topic? Are we ruining something if we create non-durable subscriptions instead? I think it doesn't matter. Currently, the durabl

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-14 Thread Asaf Mesika
Can we add another phase to this PIP - say on version x we add WARN and override mode to non-durable, and on version x+1 we fail the client? On Tue, Feb 14, 2023 at 9:48 AM Jiuming Tao wrote: > Hi Asaf, > > If we fail the client when users use Durable subscription to subscribe > NonPersistentTop

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-13 Thread Jiuming Tao
Hi Asaf, If we fail the client when users use Durable subscription to subscribe NonPersistentTopic, it will lead to break change. Users have to change their code, so we can change the `subscriptionMode` from `Durable` to `NonDurable` and print WARN log when users choose `Durable`, then, users

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-13 Thread Asaf Mesika
Clarifying: as Pengu wrote in the pip comment - if we change the default subscription mode to be non-durable for non-persistent topics, then what will happen to users who previously had durable subscriptions on that topic? Are we ruining something if we create non-durable subscriptions instead? O

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-13 Thread Asaf Mesika
Can we fail the client if they choose NonDurable subscription mode on a non-persistent topic, instead of writing WARN log messages? On Mon, Feb 13, 2023 at 4:26 AM guo jiwei wrote: > Agree,+1 > > > Regards > Jiwei Guo (Tboy) > > On Thu, Feb 9, 2023 at 7:07 PM Jiuming Tao > wrote: > > > > > > I

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-12 Thread guo jiwei
Agree,+1 Regards Jiwei Guo (Tboy) On Thu, Feb 9, 2023 at 7:07 PM Jiuming Tao wrote: > > > It makes sense > > Thanks, > Tao Jiuming > > > > 2023年2月9日 15:44,Baodi Shi 写道: > > > > Agree, and we can add verification on the client side. When the topic is > > non-persistent and uses durable to subsc

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-09 Thread Jiuming Tao
It makes sense Thanks, Tao Jiuming > 2023年2月9日 15:44,Baodi Shi 写道: > > Agree, and we can add verification on the client side. When the topic is > non-persistent and uses durable to subscribe, print warns logs: > “non-persistent not support durable subscribe will use non-durable to > subscrib

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-09 Thread Zike Yang
> How about set `isDurable = false` when create `NonPersistentSubscription`? We could directly delete the `isDurable` in this constructor. There will be no durable subscriptions on the non-persistent topic anymore. > When the topic is non-persistent and uses durable to subscribe, print warns >

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-08 Thread Baodi Shi
Agree, and we can add verification on the client side. When the topic is non-persistent and uses durable to subscribe, print warns logs: “non-persistent not support durable subscribe will use non-durable to subscribe.” Thanks, Baodi Shi 在 2023年2月9日 15:10:12 上,Jiuming Tao 写道: > Agree. But we n

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-08 Thread Jiuming Tao
> Agree. But we need to take care of the compatibility. How do we handle > this compatibility? How about set `isDurable = false` when create `NonPersistentSubscription`? In `NonPersistentSubscription`, we can change the constructor from ``` public NonPersistentSubscription(NonPersistentTopic

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-08 Thread Zike Yang
> It makes sense, for non-persistent topic, it should not create a durable > subscription. Agree. But we need to take care of the compatibility. How do we handle this compatibility? BR, Zike Yang On Thu, Feb 9, 2023 at 2:43 PM Jiuming Tao wrote: > > > We can add validation to inform the user t

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-08 Thread Jiuming Tao
> We can add validation to inform the user that a durable subscription on a > non-persistent topic is invalid. It makes sense, for non-persistent topic, it should not create a durable subscription. Thanks, Tao Jiuming > 2023年2月8日 23:06,Baodi Shi 写道: > >> >> But it seems that currently all Du

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-08 Thread Baodi Shi
> > But it seems that currently all Durable subscriptions on > non-persistent topics are NonDurable, and I wonder if that confuses > users. > We can add validation to inform the user that a durable subscription on a non-persistent topic is invalid. Thanks, Baodi Shi 在 2023年2月8日 10:48:32 上,Zike

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-07 Thread Zike Yang
I agree to remove all subscriptions when there're no consumers on the non-persistent topic. The configuration `subscriptionExpirationTimeMinutes ` should not take effect on the non-persistent topic. But it seems that currently all Durable subscriptions on non-persistent topics are NonDurable, and

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-07 Thread Jiuming Tao
> I think we are talking about the durable subscription of the non-persistent > topic, right? Yes, non-durable subscriptions created by Reader, if the reader disconnected, the subscription will be deleted automatically. For `NonPersistentDispatcher`, it has the following implementations: 1. Non

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-07 Thread Jiuming Tao
> I think we are talking about the durable subscription of the non-persistent > topic, right? Yes, non-durable subscriptions created by Reader, if the reader disconnected, the subscription will be deleted automatically. For `NonPersistentDispatcher`, it has the following implementations: 1. Non

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-07 Thread Enrico Olivelli
Penghui, Il giorno mar 7 feb 2023 alle ore 12:58 PengHui Li ha scritto: > > I think we are talking about the durable subscription of the non-persistent > topic, right? For the Reader API (non-durable subscription), the > subscription will be > removed after the reader disconnects. If not, it shou

Re: [DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-07 Thread PengHui Li
I think we are talking about the durable subscription of the non-persistent topic, right? For the Reader API (non-durable subscription), the subscription will be removed after the reader disconnects. If not, it should be BUG. IMO, we should remove the subscription automatically if all the consumer

[DISCUSS] PIP-245: Subscriptions expiration for NonPersistentTopic only

2023-02-07 Thread Jiuming Tao
Hi, I’ve opened a new PIP to discuss: Currently, in Pulsar, we have a configuration named `subscriptionExpirationTimeMinutes` to manage the subscription expiration of `PersistentTopic` and `NonPersistentTopic`. When we set a value which is greater than 0 to `subscriptionExpirationTimeMinutes`