Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-24 Thread PengHui Li
I have no objection to adding new fields, We should have no other disagreements in other respects by now, Zike, could you please help start the new VOTE email thread for this proposal? Regards, Penghui On Tue, Jan 25, 2022 at 2:46 PM Michael Marshall wrote: > > Yes, but it doesn't seem like a

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-24 Thread Michael Marshall
> Yes, but it doesn't seem like a big deal. I mentioned it to identify a subtle implication of the proposed design. I think we should be intentional about what we expose to end users. By putting this field in the protobuf, we will have more control over how users interact with this feature. >

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-23 Thread Zike Yang
> This is true of the DLQ producer, but by using the metadata map, won't we be exposing this feature to end users implicitly because they could add the field to the metadata map for other producers? (I am okay with giving users this functionality, but I know that Matteo said in a community meeting

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-22 Thread Michael Marshall
> users will not touch the metadata of the producer of a DLQ This is true of the DLQ producer, but by using the metadata map, won't we be exposing this feature to end users implicitly because they could add the field to the metadata map for other producers? (I am okay with giving users this

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-21 Thread Zike Yang
+1 for adding init_subscription filed to the metadata of CommandProducer. On Thu, Jan 20, 2022 at 2:52 PM PengHui Li wrote: > > > What is the justification for avoiding the new protobuf field? If we > add a structured field to a map of , we are still > modifying the protocol, even if we aren't

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-19 Thread PengHui Li
> What is the justification for avoiding the new protobuf field? If we add a structured field to a map of , we are still modifying the protocol, even if we aren't modifying the protobuf. Not all cases need a new field named init_subscription when creating producer, and users will not touch the

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-19 Thread Michael Marshall
> I think that, good or bad, the impression that users have that the DLQ > is not a "normal" topic Thanks for your perspective, Matteo. I still prefer my alternative design that bypasses subscription creation, but it seems there is insufficient interest in it, so we should move forward discussing

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-18 Thread PengHui Li
+1 for adding the DLQ_init_sub to producer metadata so that we don't need to introduce a new field in CommandProducer, and the new field looks a little confusing Thanks, Penghui On Mon, Jan 17, 2022 at 10:19 PM Hang Chen wrote: > Thanks for creating this proposal Zike Yang. I have two ideas

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-17 Thread Hang Chen
Thanks for creating this proposal Zike Yang. I have two ideas about it. 1. Instead of modifying the current protocol, we can use producer metadata to carry the init subscription 2. Please add auth for subscription creation when create topic by producer, otherwise, it will be easily attacked.

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-11 Thread Matteo Merli
> If we want to hold that the DLQ is not a normal topic, then I can see > why we would have a DLQ specific feature here. I think that, good or bad, the impression that users have that the DLQ is not a "normal" topic comes from 2 factors: 1. The experience with traditional messaging systems JMS

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-11 Thread Michael Marshall
> It looks like a feature that supports retaining data while no subscriptions. Yes, that is my proposed feature. How we handle messages on a topic with an empty set of subscriptions is a design decision. Note that when there are no subscriptions for a topic, the following two statements are both

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-09 Thread PengHui Li
> I think we should consider adding a new policy for Pulsar topics: a namespace (or topic) policy that makes it possible to retain messages indefinitely when a topic has no subscriptions. It looks like a feature that supports retaining data while no subscriptions. With infinite data retention,

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-07 Thread Michael Marshall
Thanks for your response, Penghui. I support simplifying message loss prevention for DLQ topics. However, it's not clear to me why we should only simplify it for DLQ topics. As a Pulsar user, I encountered many of the challenges you mention when producing to auto created topics. In my

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-04 Thread PengHui Li
Thanks for the great comments, Michael. Let me try to clarify some context about the issue that users encountered and the improvement that the proposal wants to Introduce. > Before we get further into the implementation, I'd like to discuss whether the current behavior is the expected behavior,

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2022-01-03 Thread Michael Marshall
Before we get further into the implementation, I'd like to discuss whether the current behavior is the expected behavior, as this is the key motivation for this feature. I think the DLQ's current behavior is the expected behavior because the DLQ is only a topic and topics lose messages unless

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-28 Thread Zike Yang
> Oh, that's a very interesting point. I think it'd be easy to add that > as "internal" feature, though I'm a bit puzzled on how to add that to > the producer API I think we can add a field `String initialSubscriptionName` to the Producer Configuration. And add a new field `optional string

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-22 Thread Matteo Merli
> What if we extended the `CommandProducer` command to add a > `create_subscription` field? Then, any time a topic is auto > created and this field is true, the broker would auto create a > subscription. There are some details to work out, but I think this > feature would fulfill the needs of this

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-22 Thread Michael Marshall
> I think there is an issue with the current behavior. When the init > subscription > is not created before creating deadLetterProducer, it may result in the > loss of messages. > And this is not the expected behavior. I'm not sure I agree with this assertion. The default in Pulsar is that a

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-22 Thread PengHui Li
I think we can create a consumer with the DLQ init subscription and then close the consumer? This will make the implementation easier. Penghui On Wed, Dec 22, 2021 at 4:49 PM Zike Yang wrote: > > We can avoid confusion by only attempting to create the subscription > > when

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-22 Thread Zike Yang
> We can avoid confusion by only attempting to create the subscription > when `initSubscriptionName` is not `null`. As a result, this PIP > wouldn't change the behavior for current implementations. I think there is an issue with the current behavior. When the init subscription is not created

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-21 Thread Michael Marshall
> IMO, we won't create the init subscription if `allowAutoSubscriptionCreation` > is false. Otherwise, it will confuse the user. Users can explicitly create > that > subscription to handle this case. That is a good point, but I don't think we should attempt to create the subscription implicitly

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-21 Thread Zike Yang
Thanks for your review Michael. On Tue, Dec 21, 2021 at 5:48 AM Michael Marshall wrote: > > Thanks for creating this PIP Zike Yang. This sounds like an important > improvement. I have a couple thoughts. > > 1. Does the `retryLetterTopic` have the same problem with immediate > message expiration?

Re: [DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-20 Thread Michael Marshall
Thanks for creating this PIP Zike Yang. This sounds like an important improvement. I have a couple thoughts. 1. Does the `retryLetterTopic` have the same problem with immediate message expiration? Based on a quick glance, I don't see anything creating a subscription for the retry topic. 2. Your

[DISCUSSION] PIP-124: Create init subscription before sending message to DLQ

2021-12-20 Thread Zike Yang
https://github.com/apache/pulsar/issues/13408 Pasted below for quoting convenience. —— ## Motivation If we enable the DLQ when consuming messages. For some messages that can't be processed successfully, the messages will be moved to the DLQ, but if we do not specify the data retention for