You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Jiuming Tao <jm...@streamnative.io.INVALID> on 2023/02/13 06:56:09 UTC
[Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Hi all,
I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
Motivation:
There are two types of subscriptions for a topic: Durable and Non-durable.
We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
Thanks,
Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Jiuming Tao <jm...@streamnative.io.INVALID>.
Bump
> 2023年2月13日 14:56,Jiuming Tao <jmtao@streamnative.io <ma...@streamnative.io>> 写道:
>
> Hi all,
>
> I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
>
> Motivation:
>
> There are two types of subscriptions for a topic: Durable and Non-durable.
>
> We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
>
> But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
>
> For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
>
> And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
>
> For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
>
>
>
> For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
>
> And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> Thanks,
> Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Zike Yang <zi...@apache.org>.
+1 (non-binding)
Thanks,
Zike Yang
On Wed, Feb 22, 2023 at 10:12 PM Jiuming Tao
<jm...@streamnative.io.invalid> wrote:
>
> It makes sense
>
> > 2023年2月20日 17:32,Zike Yang <zi...@apache.org> 写道:
> >
> > Hi, Jiuming,
> >
> > Overall looks good to me. Left some comments for the Compatibility section:
> >
> >> In the next release after 2.11.1, if users want to create Durable subscriptions on NonPersistentTopic, will throw an exception.
> >
> > I think this is an improvement but not a bug fix. Right?
> > The next feature release is 3.0.0. I think we should print warn logs
> > in 3.0.0 and throw exceptions may be in 3.1.0. Otherwise, it will
> > bring the breaking change here in 3.0.0.
> > The 2.11.1 is a patch release. I don't recommend cherry-picking this
> > PIP to branch-2.11 because it's not a critical bug fix.
> >
> > BR,
> > Zike Yang
> >
> >
> > Zike Yang
> >
> > On Fri, Feb 17, 2023 at 12:52 AM Baodi Shi <ba...@apache.org> wrote:
> >>
> >> +1 (non-binding)
> >>
> >> Thanks,
> >> Baodi Shi
> >>
> >>
> >> 在 2023年2月16日 21:44:17 上,Asaf Mesika <as...@gmail.com> 写道:
> >>
> >>> +1 (non-binding)
> >>>
> >>>
> >>> On Thu, Feb 16, 2023 at 11:11 AM Jiuming Tao <jmtao@streamnative.io.invalid
> >>>>
> >>> wrote:
> >>>
> >>>
> >>> I’ve added the `Compatibility` selection into the PIP, please help review
> >>>
> >>> and vote the PIP
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Tao Jiuming
> >>>
> >>>
> >>>
> >>>
> >>>> 2023年2月15日 14:58,Zike Yang <zi...@apache.org> 写道:
> >>>
> >>>>
> >>>
> >>>> Hi, Jiuming
> >>>
> >>>>
> >>>
> >>>>> bump
> >>>
> >>>>
> >>>
> >>>> As for the discussion here[0], could you add a `Compatibility` section
> >>>
> >>>> to talk about compatibility in more detail? WDYT?
> >>>
> >>>> Then we could start the vote again.
> >>>
> >>>>
> >>>
> >>>> [0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
> >>>
> >>>>
> >>>
> >>>> Thanks,
> >>>
> >>>> Zike Yang
> >>>
> >>>>
> >>>
> >>>> On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
> >>>
> >>>>>
> >>>
> >>>>>
> >>>
> >>>>> bump
> >>>
> >>>>>
> >>>
> >>>>> On 2023/02/13 06:56:09 Jiuming Tao wrote:
> >>>
> >>>>>> Hi all,
> >>>
> >>>>>>
> >>>
> >>>>>> I would like to start a VOTE on `PIP-245: Make subscriptions of
> >>>
> >>> non-persistent topic non-durable`.
> >>>
> >>>>>>
> >>>
> >>>>>> Motivation:
> >>>
> >>>>>>
> >>>
> >>>>>> There are two types of subscriptions for a topic: Durable and
> >>>
> >>> Non-durable.
> >>>
> >>>>>>
> >>>
> >>>>>> We create a Consumer with a Durable subscription and a Reader with a
> >>>
> >>> Non-durable subscription.
> >>>
> >>>>>>
> >>>
> >>>>>> But for NonPersistentTopic, creating a Durable subscription is
> >>>
> >>> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> >>>
> >>> persistent its data. After its consumer disconnected, the subscription
> >>>
> >>> couldn't be removed automatically if we didn't set the value of
> >>>
> >>> subscriptionExpirationTimeMinutes greater than 0.
> >>>
> >>>>>>
> >>>
> >>>>>> For subscriptionExpirationTimeMinutes, it controls the subscription
> >>>
> >>> expiration of NonPersistentTopic and PersistentTopic, if we set the value
> >>>
> >>> of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
> >>>
> >>> loss(The durable subscriptions of PersistentTopic also can be removed).
> >>>
> >>>>>>
> >>>
> >>>>>> And the Non-durable subscriptions will be removed automatically after
> >>>
> >>> all the consumers disconnected, it's the existing logic.
> >>>
> >>>>>>
> >>>
> >>>>>> For the purpose of removing the subscriptions which have no active
> >>>
> >>> consumers of NonPersistentTopic and the above reasons, we can make all the
> >>>
> >>> subscriptions of a NonPersistentTopic Non-durable.
> >>>
> >>>>>>
> >>>
> >>>>>>
> >>>
> >>>>>>
> >>>
> >>>>>> For more details, you can read:
> >>>
> >>> https://github.com/apache/pulsar/issues/19448 <
> >>>
> >>> https://github.com/apache/pulsar/issues/19448>
> >>>
> >>>>>>
> >>>
> >>>>>> And the discuss thread is available at:
> >>>
> >>> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
> >>>
> >>> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> >>>
> >>>>>>
> >>>
> >>>>>> Thanks,
> >>>
> >>>>>> Tao Jiuming
> >>>
> >>>
> >>>
> >>>
>
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Jiuming Tao <jm...@streamnative.io.INVALID>.
It makes sense
> 2023年2月20日 17:32,Zike Yang <zi...@apache.org> 写道:
>
> Hi, Jiuming,
>
> Overall looks good to me. Left some comments for the Compatibility section:
>
>> In the next release after 2.11.1, if users want to create Durable subscriptions on NonPersistentTopic, will throw an exception.
>
> I think this is an improvement but not a bug fix. Right?
> The next feature release is 3.0.0. I think we should print warn logs
> in 3.0.0 and throw exceptions may be in 3.1.0. Otherwise, it will
> bring the breaking change here in 3.0.0.
> The 2.11.1 is a patch release. I don't recommend cherry-picking this
> PIP to branch-2.11 because it's not a critical bug fix.
>
> BR,
> Zike Yang
>
>
> Zike Yang
>
> On Fri, Feb 17, 2023 at 12:52 AM Baodi Shi <ba...@apache.org> wrote:
>>
>> +1 (non-binding)
>>
>> Thanks,
>> Baodi Shi
>>
>>
>> 在 2023年2月16日 21:44:17 上,Asaf Mesika <as...@gmail.com> 写道:
>>
>>> +1 (non-binding)
>>>
>>>
>>> On Thu, Feb 16, 2023 at 11:11 AM Jiuming Tao <jmtao@streamnative.io.invalid
>>>>
>>> wrote:
>>>
>>>
>>> I’ve added the `Compatibility` selection into the PIP, please help review
>>>
>>> and vote the PIP
>>>
>>>
>>> Thanks,
>>>
>>> Tao Jiuming
>>>
>>>
>>>
>>>
>>>> 2023年2月15日 14:58,Zike Yang <zi...@apache.org> 写道:
>>>
>>>>
>>>
>>>> Hi, Jiuming
>>>
>>>>
>>>
>>>>> bump
>>>
>>>>
>>>
>>>> As for the discussion here[0], could you add a `Compatibility` section
>>>
>>>> to talk about compatibility in more detail? WDYT?
>>>
>>>> Then we could start the vote again.
>>>
>>>>
>>>
>>>> [0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
>>>
>>>>
>>>
>>>> Thanks,
>>>
>>>> Zike Yang
>>>
>>>>
>>>
>>>> On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
>>>
>>>>>
>>>
>>>>>
>>>
>>>>> bump
>>>
>>>>>
>>>
>>>>> On 2023/02/13 06:56:09 Jiuming Tao wrote:
>>>
>>>>>> Hi all,
>>>
>>>>>>
>>>
>>>>>> I would like to start a VOTE on `PIP-245: Make subscriptions of
>>>
>>> non-persistent topic non-durable`.
>>>
>>>>>>
>>>
>>>>>> Motivation:
>>>
>>>>>>
>>>
>>>>>> There are two types of subscriptions for a topic: Durable and
>>>
>>> Non-durable.
>>>
>>>>>>
>>>
>>>>>> We create a Consumer with a Durable subscription and a Reader with a
>>>
>>> Non-durable subscription.
>>>
>>>>>>
>>>
>>>>>> But for NonPersistentTopic, creating a Durable subscription is
>>>
>>> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
>>>
>>> persistent its data. After its consumer disconnected, the subscription
>>>
>>> couldn't be removed automatically if we didn't set the value of
>>>
>>> subscriptionExpirationTimeMinutes greater than 0.
>>>
>>>>>>
>>>
>>>>>> For subscriptionExpirationTimeMinutes, it controls the subscription
>>>
>>> expiration of NonPersistentTopic and PersistentTopic, if we set the value
>>>
>>> of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
>>>
>>> loss(The durable subscriptions of PersistentTopic also can be removed).
>>>
>>>>>>
>>>
>>>>>> And the Non-durable subscriptions will be removed automatically after
>>>
>>> all the consumers disconnected, it's the existing logic.
>>>
>>>>>>
>>>
>>>>>> For the purpose of removing the subscriptions which have no active
>>>
>>> consumers of NonPersistentTopic and the above reasons, we can make all the
>>>
>>> subscriptions of a NonPersistentTopic Non-durable.
>>>
>>>>>>
>>>
>>>>>>
>>>
>>>>>>
>>>
>>>>>> For more details, you can read:
>>>
>>> https://github.com/apache/pulsar/issues/19448 <
>>>
>>> https://github.com/apache/pulsar/issues/19448>
>>>
>>>>>>
>>>
>>>>>> And the discuss thread is available at:
>>>
>>> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
>>>
>>> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>>>
>>>>>>
>>>
>>>>>> Thanks,
>>>
>>>>>> Tao Jiuming
>>>
>>>
>>>
>>>
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Zike Yang <zi...@apache.org>.
Hi, Jiuming,
Overall looks good to me. Left some comments for the Compatibility section:
> In the next release after 2.11.1, if users want to create Durable subscriptions on NonPersistentTopic, will throw an exception.
I think this is an improvement but not a bug fix. Right?
The next feature release is 3.0.0. I think we should print warn logs
in 3.0.0 and throw exceptions may be in 3.1.0. Otherwise, it will
bring the breaking change here in 3.0.0.
The 2.11.1 is a patch release. I don't recommend cherry-picking this
PIP to branch-2.11 because it's not a critical bug fix.
BR,
Zike Yang
Zike Yang
On Fri, Feb 17, 2023 at 12:52 AM Baodi Shi <ba...@apache.org> wrote:
>
> +1 (non-binding)
>
> Thanks,
> Baodi Shi
>
>
> 在 2023年2月16日 21:44:17 上,Asaf Mesika <as...@gmail.com> 写道:
>
> > +1 (non-binding)
> >
> >
> > On Thu, Feb 16, 2023 at 11:11 AM Jiuming Tao <jmtao@streamnative.io.invalid
> > >
> > wrote:
> >
> >
> > I’ve added the `Compatibility` selection into the PIP, please help review
> >
> > and vote the PIP
> >
> >
> > Thanks,
> >
> > Tao Jiuming
> >
> >
> >
> >
> > > 2023年2月15日 14:58,Zike Yang <zi...@apache.org> 写道:
> >
> > >
> >
> > > Hi, Jiuming
> >
> > >
> >
> > >> bump
> >
> > >
> >
> > > As for the discussion here[0], could you add a `Compatibility` section
> >
> > > to talk about compatibility in more detail? WDYT?
> >
> > > Then we could start the vote again.
> >
> > >
> >
> > > [0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
> >
> > >
> >
> > > Thanks,
> >
> > > Zike Yang
> >
> > >
> >
> > > On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
> >
> > >>
> >
> > >>
> >
> > >> bump
> >
> > >>
> >
> > >> On 2023/02/13 06:56:09 Jiuming Tao wrote:
> >
> > >>> Hi all,
> >
> > >>>
> >
> > >>> I would like to start a VOTE on `PIP-245: Make subscriptions of
> >
> > non-persistent topic non-durable`.
> >
> > >>>
> >
> > >>> Motivation:
> >
> > >>>
> >
> > >>> There are two types of subscriptions for a topic: Durable and
> >
> > Non-durable.
> >
> > >>>
> >
> > >>> We create a Consumer with a Durable subscription and a Reader with a
> >
> > Non-durable subscription.
> >
> > >>>
> >
> > >>> But for NonPersistentTopic, creating a Durable subscription is
> >
> > meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> >
> > persistent its data. After its consumer disconnected, the subscription
> >
> > couldn't be removed automatically if we didn't set the value of
> >
> > subscriptionExpirationTimeMinutes greater than 0.
> >
> > >>>
> >
> > >>> For subscriptionExpirationTimeMinutes, it controls the subscription
> >
> > expiration of NonPersistentTopic and PersistentTopic, if we set the value
> >
> > of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
> >
> > loss(The durable subscriptions of PersistentTopic also can be removed).
> >
> > >>>
> >
> > >>> And the Non-durable subscriptions will be removed automatically after
> >
> > all the consumers disconnected, it's the existing logic.
> >
> > >>>
> >
> > >>> For the purpose of removing the subscriptions which have no active
> >
> > consumers of NonPersistentTopic and the above reasons, we can make all the
> >
> > subscriptions of a NonPersistentTopic Non-durable.
> >
> > >>>
> >
> > >>>
> >
> > >>>
> >
> > >>> For more details, you can read:
> >
> > https://github.com/apache/pulsar/issues/19448 <
> >
> > https://github.com/apache/pulsar/issues/19448>
> >
> > >>>
> >
> > >>> And the discuss thread is available at:
> >
> > https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
> >
> > https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> >
> > >>>
> >
> > >>> Thanks,
> >
> > >>> Tao Jiuming
> >
> >
> >
> >
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Baodi Shi <ba...@apache.org>.
+1 (non-binding)
Thanks,
Baodi Shi
在 2023年2月16日 21:44:17 上,Asaf Mesika <as...@gmail.com> 写道:
> +1 (non-binding)
>
>
> On Thu, Feb 16, 2023 at 11:11 AM Jiuming Tao <jmtao@streamnative.io.invalid
> >
> wrote:
>
>
> I’ve added the `Compatibility` selection into the PIP, please help review
>
> and vote the PIP
>
>
> Thanks,
>
> Tao Jiuming
>
>
>
>
> > 2023年2月15日 14:58,Zike Yang <zi...@apache.org> 写道:
>
> >
>
> > Hi, Jiuming
>
> >
>
> >> bump
>
> >
>
> > As for the discussion here[0], could you add a `Compatibility` section
>
> > to talk about compatibility in more detail? WDYT?
>
> > Then we could start the vote again.
>
> >
>
> > [0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
>
> >
>
> > Thanks,
>
> > Zike Yang
>
> >
>
> > On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
>
> >>
>
> >>
>
> >> bump
>
> >>
>
> >> On 2023/02/13 06:56:09 Jiuming Tao wrote:
>
> >>> Hi all,
>
> >>>
>
> >>> I would like to start a VOTE on `PIP-245: Make subscriptions of
>
> non-persistent topic non-durable`.
>
> >>>
>
> >>> Motivation:
>
> >>>
>
> >>> There are two types of subscriptions for a topic: Durable and
>
> Non-durable.
>
> >>>
>
> >>> We create a Consumer with a Durable subscription and a Reader with a
>
> Non-durable subscription.
>
> >>>
>
> >>> But for NonPersistentTopic, creating a Durable subscription is
>
> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
>
> persistent its data. After its consumer disconnected, the subscription
>
> couldn't be removed automatically if we didn't set the value of
>
> subscriptionExpirationTimeMinutes greater than 0.
>
> >>>
>
> >>> For subscriptionExpirationTimeMinutes, it controls the subscription
>
> expiration of NonPersistentTopic and PersistentTopic, if we set the value
>
> of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
>
> loss(The durable subscriptions of PersistentTopic also can be removed).
>
> >>>
>
> >>> And the Non-durable subscriptions will be removed automatically after
>
> all the consumers disconnected, it's the existing logic.
>
> >>>
>
> >>> For the purpose of removing the subscriptions which have no active
>
> consumers of NonPersistentTopic and the above reasons, we can make all the
>
> subscriptions of a NonPersistentTopic Non-durable.
>
> >>>
>
> >>>
>
> >>>
>
> >>> For more details, you can read:
>
> https://github.com/apache/pulsar/issues/19448 <
>
> https://github.com/apache/pulsar/issues/19448>
>
> >>>
>
> >>> And the discuss thread is available at:
>
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
>
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> >>>
>
> >>> Thanks,
>
> >>> Tao Jiuming
>
>
>
>
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Asaf Mesika <as...@gmail.com>.
+1 (non-binding)
On Thu, Feb 16, 2023 at 11:11 AM Jiuming Tao <jm...@streamnative.io.invalid>
wrote:
>
> I’ve added the `Compatibility` selection into the PIP, please help review
> and vote the PIP
>
> Thanks,
> Tao Jiuming
>
>
>
> > 2023年2月15日 14:58,Zike Yang <zi...@apache.org> 写道:
> >
> > Hi, Jiuming
> >
> >> bump
> >
> > As for the discussion here[0], could you add a `Compatibility` section
> > to talk about compatibility in more detail? WDYT?
> > Then we could start the vote again.
> >
> > [0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
> >
> > Thanks,
> > Zike Yang
> >
> > On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
> >>
> >>
> >> bump
> >>
> >> On 2023/02/13 06:56:09 Jiuming Tao wrote:
> >>> Hi all,
> >>>
> >>> I would like to start a VOTE on `PIP-245: Make subscriptions of
> non-persistent topic non-durable`.
> >>>
> >>> Motivation:
> >>>
> >>> There are two types of subscriptions for a topic: Durable and
> Non-durable.
> >>>
> >>> We create a Consumer with a Durable subscription and a Reader with a
> Non-durable subscription.
> >>>
> >>> But for NonPersistentTopic, creating a Durable subscription is
> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> persistent its data. After its consumer disconnected, the subscription
> couldn't be removed automatically if we didn't set the value of
> subscriptionExpirationTimeMinutes greater than 0.
> >>>
> >>> For subscriptionExpirationTimeMinutes, it controls the subscription
> expiration of NonPersistentTopic and PersistentTopic, if we set the value
> of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
> loss(The durable subscriptions of PersistentTopic also can be removed).
> >>>
> >>> And the Non-durable subscriptions will be removed automatically after
> all the consumers disconnected, it's the existing logic.
> >>>
> >>> For the purpose of removing the subscriptions which have no active
> consumers of NonPersistentTopic and the above reasons, we can make all the
> subscriptions of a NonPersistentTopic Non-durable.
> >>>
> >>>
> >>>
> >>> For more details, you can read:
> https://github.com/apache/pulsar/issues/19448 <
> https://github.com/apache/pulsar/issues/19448>
> >>>
> >>> And the discuss thread is available at:
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> >>>
> >>> Thanks,
> >>> Tao Jiuming
>
>
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Jiuming Tao <jm...@streamnative.io.INVALID>.
I’ve added the `Compatibility` selection into the PIP, please help review and vote the PIP
Thanks,
Tao Jiuming
> 2023年2月15日 14:58,Zike Yang <zi...@apache.org> 写道:
>
> Hi, Jiuming
>
>> bump
>
> As for the discussion here[0], could you add a `Compatibility` section
> to talk about compatibility in more detail? WDYT?
> Then we could start the vote again.
>
> [0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
>
> Thanks,
> Zike Yang
>
> On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
>>
>>
>> bump
>>
>> On 2023/02/13 06:56:09 Jiuming Tao wrote:
>>> Hi all,
>>>
>>> I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
>>>
>>> Motivation:
>>>
>>> There are two types of subscriptions for a topic: Durable and Non-durable.
>>>
>>> We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
>>>
>>> But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
>>>
>>> For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
>>>
>>> And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
>>>
>>> For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
>>>
>>>
>>>
>>> For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
>>>
>>> And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>>>
>>> Thanks,
>>> Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Zike Yang <zi...@apache.org>.
Hi, Jiuming
> bump
As for the discussion here[0], could you add a `Compatibility` section
to talk about compatibility in more detail? WDYT?
Then we could start the vote again.
[0] https://lists.apache.org/thread/2bjg39zh7z38bzbnqngbo5l4jzkjttrq
Thanks,
Zike Yang
On Wed, Feb 15, 2023 at 1:34 PM Tao Jiuming <da...@apache.org> wrote:
>
>
> bump
>
> On 2023/02/13 06:56:09 Jiuming Tao wrote:
> > Hi all,
> >
> > I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
> >
> > Motivation:
> >
> > There are two types of subscriptions for a topic: Durable and Non-durable.
> >
> > We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
> >
> > But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
> >
> > For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
> >
> > And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
> >
> > For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
> >
> >
> >
> > For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
> >
> > And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> >
> > Thanks,
> > Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Tao Jiuming <da...@apache.org>.
bump
On 2023/02/13 06:56:09 Jiuming Tao wrote:
> Hi all,
>
> I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
>
> Motivation:
>
> There are two types of subscriptions for a topic: Durable and Non-durable.
>
> We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
>
> But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
>
> For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
>
> And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
>
> For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
>
>
>
> For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
>
> And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> Thanks,
> Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Asaf Mesika <as...@gmail.com>.
I made a small comment on the PIP just now.
On Mon, Feb 13, 2023 at 8:56 AM Jiuming Tao <jm...@streamnative.io.invalid>
wrote:
> Hi all,
>
> I would like to start a VOTE on `PIP-245: Make subscriptions of
> non-persistent topic non-durable`.
>
> Motivation:
>
> There are two types of subscriptions for a topic: Durable and Non-durable.
>
> We create a Consumer with a Durable subscription and a Reader with a
> Non-durable subscription.
>
> But for NonPersistentTopic, creating a Durable subscription is
> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> persistent its data. After its consumer disconnected, the subscription
> couldn't be removed automatically if we didn't set the value of
> subscriptionExpirationTimeMinutes greater than 0.
>
> For subscriptionExpirationTimeMinutes, it controls the subscription
> expiration of NonPersistentTopic and PersistentTopic, if we set the value
> of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
> loss(The durable subscriptions of PersistentTopic also can be removed).
>
> And the Non-durable subscriptions will be removed automatically after all
> the consumers disconnected, it's the existing logic.
>
> For the purpose of removing the subscriptions which have no active
> consumers of NonPersistentTopic and the above reasons, we can make all the
> subscriptions of a NonPersistentTopic Non-durable.
>
>
>
> For more details, you can read:
> https://github.com/apache/pulsar/issues/19448 <
> https://github.com/apache/pulsar/issues/19448>
>
> And the discuss thread is available at:
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> Thanks,
> Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by 丛搏 <bo...@apache.org>.
+1 (binding)
Thanks,
Bo
guo jiwei <te...@apache.org> 于2023年3月6日周一 19:10写道:
>
> +1 (binding)
>
> Regards
> Jiwei Guo (Tboy)
>
> On Mon, Mar 6, 2023 at 9:59 AM Yunze Xu <yz...@streamnative.io.invalid> wrote:
> >
> > +1 (binding)
> >
> > Thanks,
> > Yunze
> >
> > On Fri, Mar 3, 2023 at 11:46 AM PengHui Li <co...@gmail.com> wrote:
> > >
> > > +1 (binding)
> > >
> > > Penghui
> > >
> > > > On Feb 13, 2023, at 14:56, Jiuming Tao <jm...@streamnative.io.INVALID> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
> > > >
> > > > Motivation:
> > > >
> > > > There are two types of subscriptions for a topic: Durable and Non-durable.
> > > >
> > > > We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
> > > >
> > > > But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
> > > >
> > > > For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
> > > >
> > > > And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
> > > >
> > > > For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
> > > >
> > > >
> > > >
> > > > For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
> > > >
> > > > And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> > > >
> > > > Thanks,
> > > > Tao Jiuming
> > >
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by guo jiwei <te...@apache.org>.
+1 (binding)
Regards
Jiwei Guo (Tboy)
On Mon, Mar 6, 2023 at 9:59 AM Yunze Xu <yz...@streamnative.io.invalid> wrote:
>
> +1 (binding)
>
> Thanks,
> Yunze
>
> On Fri, Mar 3, 2023 at 11:46 AM PengHui Li <co...@gmail.com> wrote:
> >
> > +1 (binding)
> >
> > Penghui
> >
> > > On Feb 13, 2023, at 14:56, Jiuming Tao <jm...@streamnative.io.INVALID> wrote:
> > >
> > > Hi all,
> > >
> > > I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
> > >
> > > Motivation:
> > >
> > > There are two types of subscriptions for a topic: Durable and Non-durable.
> > >
> > > We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
> > >
> > > But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
> > >
> > > For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
> > >
> > > And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
> > >
> > > For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
> > >
> > >
> > >
> > > For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
> > >
> > > And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> > >
> > > Thanks,
> > > Tao Jiuming
> >
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Yunze Xu <yz...@streamnative.io.INVALID>.
+1 (binding)
Thanks,
Yunze
On Fri, Mar 3, 2023 at 11:46 AM PengHui Li <co...@gmail.com> wrote:
>
> +1 (binding)
>
> Penghui
>
> > On Feb 13, 2023, at 14:56, Jiuming Tao <jm...@streamnative.io.INVALID> wrote:
> >
> > Hi all,
> >
> > I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
> >
> > Motivation:
> >
> > There are two types of subscriptions for a topic: Durable and Non-durable.
> >
> > We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
> >
> > But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
> >
> > For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
> >
> > And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
> >
> > For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
> >
> >
> >
> > For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
> >
> > And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> >
> > Thanks,
> > Tao Jiuming
>
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by PengHui Li <co...@gmail.com>.
+1 (binding)
Penghui
> On Feb 13, 2023, at 14:56, Jiuming Tao <jm...@streamnative.io.INVALID> wrote:
>
> Hi all,
>
> I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
>
> Motivation:
>
> There are two types of subscriptions for a topic: Durable and Non-durable.
>
> We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
>
> But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
>
> For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
>
> And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
>
> For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
>
>
>
> For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
>
> And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> Thanks,
> Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by 太上玄元道君 <da...@apache.org>.
Hi Rajan,
Even we don't persistent NonPersistentSubscription's state, but it has a
`isDurable` field
```
public NonPersistentSubscription(NonPersistentTopic topic, String
subscriptionName, boolean isDurable,
Map<String, String> properties) {
this.topic = topic;
this.topicName = topic.getName();
this.subName = subscriptionName;
this.fullName = MoreObjects.toStringHelper(this).add("topic",
topicName).add("name", subName).toString();
IS_FENCED_UPDATER.set(this, FALSE);
this.lastActive = System.currentTimeMillis();
this.isDurable = isDurable;
this.subscriptionProperties = properties != null
? Collections.unmodifiableMap(properties) :
Collections.emptyMap();
}
```
When users create a `Consumer`, the `durable` will set to be `true`.
And in `removeConsumer` method of `NonPersistentSubscription`, after
consumers disconnected, we can remove the `durable` subscription
automatically.
```
public synchronized void removeConsumer(Consumer consumer, boolean
isResetCursor) throws BrokerServiceException {
updateLastActive();
if (dispatcher != null) {
dispatcher.removeConsumer(consumer);
}
// preserve accumulative stats form removed consumer
ConsumerStatsImpl stats = consumer.getStats();
bytesOutFromRemovedConsumers.add(stats.bytesOutCounter);
msgOutFromRemovedConsumer.add(stats.msgOutCounter);
if (!isDurable) {
topic.unsubscribe(subName);
}
// invalid consumer remove will throw an exception
// decrement usage is triggered only for valid consumer close
topic.decrementUsageCount();
if (log.isDebugEnabled()) {
log.debug("[{}] [{}] [{}] Removed consumer -- count: {}",
topic.getName(), subName, consumer.consumerName(),
topic.currentUsageCount());
}
}
```
The PIP is for the purpose of deprecate `durable` subscriptions on
NonPersistentTopic for the following reasons:
1. We don't persistent NonPersistentSubscription's state, it's totally
in-memory state, keep the `isDurable` field is meaningless and may takes
misunderstanding
2. The expired subscriptions auto clean like wrote in the PIP.
Thanks,
Tao Jiuming
Rajan Dhabalia <rd...@apache.org> 于2023年2月23日周四 12:33写道:
> > But for NonPersistentTopic, creating a Durable subscription is
> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> persistent its data. After its consumer disconnected, the subscription
> couldn't be removed automatically if we didn't set the value of
> subscriptionExpirationTimeMinutes greater than 0.
> This is not correct. Non-Persistent topics don't create durable
> subscriptions but It creates NonPersistent Subscription without storing its
> state.
>
> > if we set the value of subscriptionExpirationTimeMinutes greater than 0,
> it may lead to data loss(The durable subscriptions of PersistentTopic also
> can be removed).
> Non-Persistent topics don't provide data persistent or dispatch guarantee
> and it's by design so, let's not try to change semantics of non-persistent
> topic and there could be data loss in non-persistent topic.
>
> > And the Non-durable subscriptions will be removed automatically after all
> the consumers disconnected, it's the existing logic.
> Why can't we do this in the existing NonPersistent Subscription? I really
> don't understand the purpose of this PIP?
>
> Thanks,
> Rajan
>
> On Sun, Feb 12, 2023 at 10:56 PM Jiuming Tao <jmtao@streamnative.io.invalid
> >
> wrote:
>
> > Hi all,
> >
> > I would like to start a VOTE on `PIP-245: Make subscriptions of
> > non-persistent topic non-durable`.
> >
> > Motivation:
> >
> > There are two types of subscriptions for a topic: Durable and
> Non-durable.
> >
> > We create a Consumer with a Durable subscription and a Reader with a
> > Non-durable subscription.
> >
> > But for NonPersistentTopic, creating a Durable subscription is
> > meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> > persistent its data. After its consumer disconnected, the subscription
> > couldn't be removed automatically if we didn't set the value of
> > subscriptionExpirationTimeMinutes greater than 0.
> >
> > For subscriptionExpirationTimeMinutes, it controls the subscription
> > expiration of NonPersistentTopic and PersistentTopic, if we set the value
> > of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
> > loss(The durable subscriptions of PersistentTopic also can be removed).
> >
> > And the Non-durable subscriptions will be removed automatically after all
> > the consumers disconnected, it's the existing logic.
> >
> > For the purpose of removing the subscriptions which have no active
> > consumers of NonPersistentTopic and the above reasons, we can make all
> the
> > subscriptions of a NonPersistentTopic Non-durable.
> >
> >
> >
> > For more details, you can read:
> > https://github.com/apache/pulsar/issues/19448 <
> > https://github.com/apache/pulsar/issues/19448>
> >
> > And the discuss thread is available at:
> > https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
> > https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
> >
> > Thanks,
> > Tao Jiuming
>
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Rajan Dhabalia <rd...@apache.org>.
> But for NonPersistentTopic, creating a Durable subscription is
meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
persistent its data. After its consumer disconnected, the subscription
couldn't be removed automatically if we didn't set the value of
subscriptionExpirationTimeMinutes greater than 0.
This is not correct. Non-Persistent topics don't create durable
subscriptions but It creates NonPersistent Subscription without storing its
state.
> if we set the value of subscriptionExpirationTimeMinutes greater than 0,
it may lead to data loss(The durable subscriptions of PersistentTopic also
can be removed).
Non-Persistent topics don't provide data persistent or dispatch guarantee
and it's by design so, let's not try to change semantics of non-persistent
topic and there could be data loss in non-persistent topic.
> And the Non-durable subscriptions will be removed automatically after all
the consumers disconnected, it's the existing logic.
Why can't we do this in the existing NonPersistent Subscription? I really
don't understand the purpose of this PIP?
Thanks,
Rajan
On Sun, Feb 12, 2023 at 10:56 PM Jiuming Tao <jm...@streamnative.io.invalid>
wrote:
> Hi all,
>
> I would like to start a VOTE on `PIP-245: Make subscriptions of
> non-persistent topic non-durable`.
>
> Motivation:
>
> There are two types of subscriptions for a topic: Durable and Non-durable.
>
> We create a Consumer with a Durable subscription and a Reader with a
> Non-durable subscription.
>
> But for NonPersistentTopic, creating a Durable subscription is
> meaningless, NonPersistentSubscription doesn't have a ManagedCursor to
> persistent its data. After its consumer disconnected, the subscription
> couldn't be removed automatically if we didn't set the value of
> subscriptionExpirationTimeMinutes greater than 0.
>
> For subscriptionExpirationTimeMinutes, it controls the subscription
> expiration of NonPersistentTopic and PersistentTopic, if we set the value
> of subscriptionExpirationTimeMinutes greater than 0, it may lead to data
> loss(The durable subscriptions of PersistentTopic also can be removed).
>
> And the Non-durable subscriptions will be removed automatically after all
> the consumers disconnected, it's the existing logic.
>
> For the purpose of removing the subscriptions which have no active
> consumers of NonPersistentTopic and the above reasons, we can make all the
> subscriptions of a NonPersistentTopic Non-durable.
>
>
>
> For more details, you can read:
> https://github.com/apache/pulsar/issues/19448 <
> https://github.com/apache/pulsar/issues/19448>
>
> And the discuss thread is available at:
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <
> https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> Thanks,
> Tao Jiuming
Re: [Vote] PIP-245: Make subscriptions of non-persistent topic non-durable
Posted by Tao Jiuming <da...@apache.org>.
bump
On 2023/02/13 06:56:09 Jiuming Tao wrote:
> Hi all,
>
> I would like to start a VOTE on `PIP-245: Make subscriptions of non-persistent topic non-durable`.
>
> Motivation:
>
> There are two types of subscriptions for a topic: Durable and Non-durable.
>
> We create a Consumer with a Durable subscription and a Reader with a Non-durable subscription.
>
> But for NonPersistentTopic, creating a Durable subscription is meaningless, NonPersistentSubscription doesn't have a ManagedCursor to persistent its data. After its consumer disconnected, the subscription couldn't be removed automatically if we didn't set the value of subscriptionExpirationTimeMinutes greater than 0.
>
> For subscriptionExpirationTimeMinutes, it controls the subscription expiration of NonPersistentTopic and PersistentTopic, if we set the value of subscriptionExpirationTimeMinutes greater than 0, it may lead to data loss(The durable subscriptions of PersistentTopic also can be removed).
>
> And the Non-durable subscriptions will be removed automatically after all the consumers disconnected, it's the existing logic.
>
> For the purpose of removing the subscriptions which have no active consumers of NonPersistentTopic and the above reasons, we can make all the subscriptions of a NonPersistentTopic Non-durable.
>
>
>
> For more details, you can read: https://github.com/apache/pulsar/issues/19448 <https://github.com/apache/pulsar/issues/19448>
>
> And the discuss thread is available at: https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst <https://lists.apache.org/thread/2ltmyglnb25jy8nk58twkwbglws43bst>
>
> Thanks,
> Tao Jiuming