You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by ni...@afshartous.com on 2018/08/09 00:38:03 UTC

[VOTE] KIP-349 Priorities for Source Topics

Hi All,

Calling for a vote on KIP-349 

  https://cwiki.apache.org/confluence/display/KAFKA/KIP-349%3A+Priorities+for+Source+Topics <https://cwiki.apache.org/confluence/display/KAFKA/KIP-349:+Priorities+for+Source+Topics>

Cheers,
--
      Nick




Re: [DISCUSS] KIP-349 Priorities for Source Topics

Posted by Jan Filipiak <Ja...@trivago.com>.

On 30.08.2018 15:17, Matthias J. Sax wrote:
> Nick,
>
> Would be good to understand the difference between the current approach
> and what Jan suggested. If we believe that the current proposal is too
> limited in functionality and also hard to extend later on, it might make
> sense to work on a more generic solution from the beginning on. On the
> other hand, if we can extend the current proposal easily, I see no
> reason to build this incrementally.
Difference is that from my POV topic priorities is a special 
implementation of a MessageChooser

>
> @Jan: Can you summarize the differences from you point of view? You also
> linked to KIP-353 in the VOTE thread -- how does it related to this KIP?
The relationship is rather obvious to me. KIP-353 can be implemented as 
a MessageChooser
>
> -Matthias
To add more confusion, why not also make "pause partition" as in connect 
part of the MessageChooser interface?

>
>
> On 8/12/18 11:15 PM, Matt Farmer wrote:
>> Ah, sorry, yes it does.
>>
>> On Sun, Aug 12, 2018 at 2:58 PM <ni...@afshartous.com> wrote:
>>
>>> Does this clarify ?
>>> --
>>>        Nick
>>>
>>> On Aug 9, 2018, at 7:44 PM, nick@afshartous.com wrote:
>>>
>>> Since there are questions I changed the heading from VOTE to DISCUSS
>>>
>>> On Aug 8, 2018, at 9:09 PM, Matt Farmer <ma...@frmr.me> wrote:
>>>
>>> s it worth spelling out explicitly what the behavior is when two topics
>>> have the same priority? I'm a bit fuzzy on how we choose what topics to
>>> consume from right now, if I'm being honest, so it could be useful to
>>> outline the current behavior in the background and to spell out how that
>>> would change (or if it would change) when two topics are given the same
>>> priority.
>>>
>>>
>>> I added an additional note in the KIP’s Compatibility section to clarify
>>> that current behavior would not change in order to preserve backwards
>>> compatibility.
>>>
>>> Also, how does this play with max.poll.records? Does the consumer read from
>>>
>>> all the topics in priority order until we've hit the number of records or
>>> the poll timeout? Or does it immediately return the high priority records
>>> without pulling low priority records?
>>>
>>>
>>> My own interpretation would be to read from all the topics in priority
>>> order as the consumer is subscribed to multiple topics.
>>> --
>>>        Nick
>>>
>>>
>>>
>>>
>>>
>>>
>>>


Re: [DISCUSS] KIP-349 Priorities for Source Topics

Posted by "Matthias J. Sax" <ma...@confluent.io>.
Nick,

Would be good to understand the difference between the current approach
and what Jan suggested. If we believe that the current proposal is too
limited in functionality and also hard to extend later on, it might make
sense to work on a more generic solution from the beginning on. On the
other hand, if we can extend the current proposal easily, I see no
reason to build this incrementally.

@Jan: Can you summarize the differences from you point of view? You also
linked to KIP-353 in the VOTE thread -- how does it related to this KIP?


-Matthias


On 8/12/18 11:15 PM, Matt Farmer wrote:
> Ah, sorry, yes it does.
> 
> On Sun, Aug 12, 2018 at 2:58 PM <ni...@afshartous.com> wrote:
> 
>> Does this clarify ?
>> --
>>       Nick
>>
>> On Aug 9, 2018, at 7:44 PM, nick@afshartous.com wrote:
>>
>> Since there are questions I changed the heading from VOTE to DISCUSS
>>
>> On Aug 8, 2018, at 9:09 PM, Matt Farmer <ma...@frmr.me> wrote:
>>
>> s it worth spelling out explicitly what the behavior is when two topics
>> have the same priority? I'm a bit fuzzy on how we choose what topics to
>> consume from right now, if I'm being honest, so it could be useful to
>> outline the current behavior in the background and to spell out how that
>> would change (or if it would change) when two topics are given the same
>> priority.
>>
>>
>> I added an additional note in the KIP’s Compatibility section to clarify
>> that current behavior would not change in order to preserve backwards
>> compatibility.
>>
>> Also, how does this play with max.poll.records? Does the consumer read from
>>
>> all the topics in priority order until we've hit the number of records or
>> the poll timeout? Or does it immediately return the high priority records
>> without pulling low priority records?
>>
>>
>> My own interpretation would be to read from all the topics in priority
>> order as the consumer is subscribed to multiple topics.
>> --
>>       Nick
>>
>>
>>
>>
>>
>>
>>
> 


Re: [DISCUSS] KIP-349 Priorities for Source Topics

Posted by Matt Farmer <ma...@frmr.me>.
Ah, sorry, yes it does.

On Sun, Aug 12, 2018 at 2:58 PM <ni...@afshartous.com> wrote:

> Does this clarify ?
> --
>       Nick
>
> On Aug 9, 2018, at 7:44 PM, nick@afshartous.com wrote:
>
> Since there are questions I changed the heading from VOTE to DISCUSS
>
> On Aug 8, 2018, at 9:09 PM, Matt Farmer <ma...@frmr.me> wrote:
>
> s it worth spelling out explicitly what the behavior is when two topics
> have the same priority? I'm a bit fuzzy on how we choose what topics to
> consume from right now, if I'm being honest, so it could be useful to
> outline the current behavior in the background and to spell out how that
> would change (or if it would change) when two topics are given the same
> priority.
>
>
> I added an additional note in the KIP’s Compatibility section to clarify
> that current behavior would not change in order to preserve backwards
> compatibility.
>
> Also, how does this play with max.poll.records? Does the consumer read from
>
> all the topics in priority order until we've hit the number of records or
> the poll timeout? Or does it immediately return the high priority records
> without pulling low priority records?
>
>
> My own interpretation would be to read from all the topics in priority
> order as the consumer is subscribed to multiple topics.
> --
>       Nick
>
>
>
>
>
>
>

Re: [DISCUSS] KIP-349 Priorities for Source Topics

Posted by ni...@afshartous.com.
Does this clarify ?  
--
      Nick

> On Aug 9, 2018, at 7:44 PM, nick@afshartous.com wrote:
> 
> Since there are questions I changed the heading from VOTE to DISCUSS
> 
>> On Aug 8, 2018, at 9:09 PM, Matt Farmer <matt@frmr.me <ma...@frmr.me>> wrote:
>> 
>> s it worth spelling out explicitly what the behavior is when two topics
>> have the same priority? I'm a bit fuzzy on how we choose what topics to
>> consume from right now, if I'm being honest, so it could be useful to
>> outline the current behavior in the background and to spell out how that
>> would change (or if it would change) when two topics are given the same
>> priority.
> 
> I added an additional note in the KIP’s Compatibility section to clarify that current behavior would not change in order to preserve backwards compatibility.  
> 
>> Also, how does this play with max.poll.records? Does the consumer read from
>> all the topics in priority order until we've hit the number of records or
>> the poll timeout? Or does it immediately return the high priority records
>> without pulling low priority records?
> 
> 
> My own interpretation would be to read from all the topics in priority order as the consumer is subscribed to multiple topics.  
> --
>       Nick






[DISCUSS] KIP-349 Priorities for Source Topics

Posted by ni...@afshartous.com.
Since there are questions I changed the heading from VOTE to DISCUSS

> On Aug 8, 2018, at 9:09 PM, Matt Farmer <ma...@frmr.me> wrote:
> 
> s it worth spelling out explicitly what the behavior is when two topics
> have the same priority? I'm a bit fuzzy on how we choose what topics to
> consume from right now, if I'm being honest, so it could be useful to
> outline the current behavior in the background and to spell out how that
> would change (or if it would change) when two topics are given the same
> priority.

I added an additional note in the KIP’s Compatibility section to clarify that current behavior would not change in order to preserve backwards compatibility.  

> Also, how does this play with max.poll.records? Does the consumer read from
> all the topics in priority order until we've hit the number of records or
> the poll timeout? Or does it immediately return the high priority records
> without pulling low priority records?


My own interpretation would be to read from all the topics in priority order as the consumer is subscribed to multiple topics.  
--
      Nick

> 
> 
> On Wed, Aug 8, 2018 at 8:39 PM <nick@afshartous.com <ma...@afshartous.com>> wrote:
> 
>> 
>> Hi All,
>> 
>> Calling for a vote on KIP-349
>> 
>> 
>> https://cwiki.apache.org/confluence/display/KAFKA/KIP-349%3A+Priorities+for+Source+Topics <https://cwiki.apache.org/confluence/display/KAFKA/KIP-349%3A+Priorities+for+Source+Topics>
>> <
>> https://cwiki.apache.org/confluence/display/KAFKA/KIP-349:+Priorities+for+Source+Topics <https://cwiki.apache.org/confluence/display/KAFKA/KIP-349:+Priorities+for+Source+Topics>
>> 





Re: [VOTE] KIP-349 Priorities for Source Topics

Posted by Gwen Shapira <gw...@confluent.io>.
Both use-case: Command queue for a streams job and work-queue in general
seem reasonable. Thank you for explaining.

On Sun, Aug 12, 2018 at 6:34 AM, Matt Farmer <ma...@frmr.me> wrote:

> The work-queue use case is mostly how I see this being used, yes.
>
> In the most generic sense I can see its use in a situation where the
> business dictates
> that we have to guarantee quality of service for some set of low number of
> messages while
> there's some high number of messages being processed from a different
> topic.
>
> For our pipelines at work, this would actually make it possible for us to
> define a command
> and control topic for some of our streams applications. We occasionally
> have to change the
> behavior of our streams in reaction to system issues or, occasionally,
> user's abusing the
> system and creating a bunch of garbage data that we'd like to skip over.
> Today, we have
> to either define that behavior in a config setting and restart the
> application (which is what
> we currently do) or implement some sort of API external to streams that the
> stream pulls
> state from.
>
> With a CnC topic, we could interleave these into the normal stream
> processing flow and
> instruct it to alter a state store, for example, with the criteria for
> records to be dropped
> without introducing other libraries or having to manually synchronize with
> external state.
>
> On Wed, Aug 8, 2018 at 10:11 PM Gwen Shapira <gw...@confluent.io> wrote:
>
> > Can you guys spell it out for me? I just don't really see when I want to
> > subscribe to two topics but not get events from both at the same time.
> > Is this a work-queue type pattern?
> >
> > On Wed, Aug 8, 2018 at 6:10 PM, Matt Farmer <ma...@frmr.me> wrote:
> >
> > > Oh, almost forgot, thanks for the KIP - I can see this being a very
> > useful
> > > addition. :)
> > >
> > > On Wed, Aug 8, 2018 at 9:09 PM Matt Farmer <ma...@frmr.me> wrote:
> > >
> > > > Is it worth spelling out explicitly what the behavior is when two
> > topics
> > > > have the same priority? I'm a bit fuzzy on how we choose what topics
> to
> > > > consume from right now, if I'm being honest, so it could be useful to
> > > > outline the current behavior in the background and to spell out how
> > that
> > > > would change (or if it would change) when two topics are given the
> same
> > > > priority.
> > > >
> > > > Also, how does this play with max.poll.records? Does the consumer
> read
> > > > from all the topics in priority order until we've hit the number of
> > > records
> > > > or the poll timeout? Or does it immediately return the high priority
> > > > records without pulling low priority records?
> > > >
> > > > On Wed, Aug 8, 2018 at 8:39 PM <ni...@afshartous.com> wrote:
> > > >
> > > >>
> > > >> Hi All,
> > > >>
> > > >> Calling for a vote on KIP-349
> > > >>
> > > >>
> > > >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > > 349%3A+Priorities+for+Source+Topics
> > > >> <
> > > >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > > 349:+Priorities+for+Source+Topics
> > > >> >
> > > >>
> > > >> Cheers,
> > > >> --
> > > >>       Nick
> > > >>
> > > >>
> > > >>
> > > >>
> > >
> >
> >
> >
> > --
> > *Gwen Shapira*
> > Product Manager | Confluent
> > 650.450.2760 | @gwenshap
> > Follow us: Twitter <https://twitter.com/ConfluentInc> | blog
> > <http://www.confluent.io/blog>
> >
>



-- 
*Gwen Shapira*
Product Manager | Confluent
650.450.2760 | @gwenshap
Follow us: Twitter <https://twitter.com/ConfluentInc> | blog
<http://www.confluent.io/blog>

Re: [VOTE] KIP-349 Priorities for Source Topics

Posted by Matt Farmer <ma...@frmr.me>.
In thinking on it, another solution for this is another consumer external
to the stream - but then we run into timing issues and complexity with
using a state store as the storage of record. :/
On Sun, Aug 12, 2018 at 9:34 AM Matt Farmer <ma...@frmr.me> wrote:

> The work-queue use case is mostly how I see this being used, yes.
>
> In the most generic sense I can see its use in a situation where the
> business dictates
> that we have to guarantee quality of service for some set of low number of
> messages while
> there's some high number of messages being processed from a different
> topic.
>
> For our pipelines at work, this would actually make it possible for us to
> define a command
> and control topic for some of our streams applications. We occasionally
> have to change the
> behavior of our streams in reaction to system issues or, occasionally,
> user's abusing the
> system and creating a bunch of garbage data that we'd like to skip over.
> Today, we have
> to either define that behavior in a config setting and restart the
> application (which is what
> we currently do) or implement some sort of API external to streams that
> the stream pulls
> state from.
>
> With a CnC topic, we could interleave these into the normal stream
> processing flow and
> instruct it to alter a state store, for example, with the criteria for
> records to be dropped
> without introducing other libraries or having to manually synchronize with
> external state.
>
> On Wed, Aug 8, 2018 at 10:11 PM Gwen Shapira <gw...@confluent.io> wrote:
>
>> Can you guys spell it out for me? I just don't really see when I want to
>> subscribe to two topics but not get events from both at the same time.
>> Is this a work-queue type pattern?
>>
>> On Wed, Aug 8, 2018 at 6:10 PM, Matt Farmer <ma...@frmr.me> wrote:
>>
>> > Oh, almost forgot, thanks for the KIP - I can see this being a very
>> useful
>> > addition. :)
>> >
>> > On Wed, Aug 8, 2018 at 9:09 PM Matt Farmer <ma...@frmr.me> wrote:
>> >
>> > > Is it worth spelling out explicitly what the behavior is when two
>> topics
>> > > have the same priority? I'm a bit fuzzy on how we choose what topics
>> to
>> > > consume from right now, if I'm being honest, so it could be useful to
>> > > outline the current behavior in the background and to spell out how
>> that
>> > > would change (or if it would change) when two topics are given the
>> same
>> > > priority.
>> > >
>> > > Also, how does this play with max.poll.records? Does the consumer read
>> > > from all the topics in priority order until we've hit the number of
>> > records
>> > > or the poll timeout? Or does it immediately return the high priority
>> > > records without pulling low priority records?
>> > >
>> > > On Wed, Aug 8, 2018 at 8:39 PM <ni...@afshartous.com> wrote:
>> > >
>> > >>
>> > >> Hi All,
>> > >>
>> > >> Calling for a vote on KIP-349
>> > >>
>> > >>
>> > >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
>> > 349%3A+Priorities+for+Source+Topics
>> > >> <
>> > >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
>> > 349:+Priorities+for+Source+Topics
>> > >> >
>> > >>
>> > >> Cheers,
>> > >> --
>> > >>       Nick
>> > >>
>> > >>
>> > >>
>> > >>
>> >
>>
>>
>>
>> --
>> *Gwen Shapira*
>> Product Manager | Confluent
>> 650.450.2760 | @gwenshap
>> Follow us: Twitter <https://twitter.com/ConfluentInc> | blog
>> <http://www.confluent.io/blog>
>>
>

Re: [VOTE] KIP-349 Priorities for Source Topics

Posted by Matt Farmer <ma...@frmr.me>.
The work-queue use case is mostly how I see this being used, yes.

In the most generic sense I can see its use in a situation where the
business dictates
that we have to guarantee quality of service for some set of low number of
messages while
there's some high number of messages being processed from a different topic.

For our pipelines at work, this would actually make it possible for us to
define a command
and control topic for some of our streams applications. We occasionally
have to change the
behavior of our streams in reaction to system issues or, occasionally,
user's abusing the
system and creating a bunch of garbage data that we'd like to skip over.
Today, we have
to either define that behavior in a config setting and restart the
application (which is what
we currently do) or implement some sort of API external to streams that the
stream pulls
state from.

With a CnC topic, we could interleave these into the normal stream
processing flow and
instruct it to alter a state store, for example, with the criteria for
records to be dropped
without introducing other libraries or having to manually synchronize with
external state.

On Wed, Aug 8, 2018 at 10:11 PM Gwen Shapira <gw...@confluent.io> wrote:

> Can you guys spell it out for me? I just don't really see when I want to
> subscribe to two topics but not get events from both at the same time.
> Is this a work-queue type pattern?
>
> On Wed, Aug 8, 2018 at 6:10 PM, Matt Farmer <ma...@frmr.me> wrote:
>
> > Oh, almost forgot, thanks for the KIP - I can see this being a very
> useful
> > addition. :)
> >
> > On Wed, Aug 8, 2018 at 9:09 PM Matt Farmer <ma...@frmr.me> wrote:
> >
> > > Is it worth spelling out explicitly what the behavior is when two
> topics
> > > have the same priority? I'm a bit fuzzy on how we choose what topics to
> > > consume from right now, if I'm being honest, so it could be useful to
> > > outline the current behavior in the background and to spell out how
> that
> > > would change (or if it would change) when two topics are given the same
> > > priority.
> > >
> > > Also, how does this play with max.poll.records? Does the consumer read
> > > from all the topics in priority order until we've hit the number of
> > records
> > > or the poll timeout? Or does it immediately return the high priority
> > > records without pulling low priority records?
> > >
> > > On Wed, Aug 8, 2018 at 8:39 PM <ni...@afshartous.com> wrote:
> > >
> > >>
> > >> Hi All,
> > >>
> > >> Calling for a vote on KIP-349
> > >>
> > >>
> > >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > 349%3A+Priorities+for+Source+Topics
> > >> <
> > >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> > 349:+Priorities+for+Source+Topics
> > >> >
> > >>
> > >> Cheers,
> > >> --
> > >>       Nick
> > >>
> > >>
> > >>
> > >>
> >
>
>
>
> --
> *Gwen Shapira*
> Product Manager | Confluent
> 650.450.2760 | @gwenshap
> Follow us: Twitter <https://twitter.com/ConfluentInc> | blog
> <http://www.confluent.io/blog>
>

Re: [VOTE] KIP-349 Priorities for Source Topics

Posted by Gwen Shapira <gw...@confluent.io>.
Can you guys spell it out for me? I just don't really see when I want to
subscribe to two topics but not get events from both at the same time.
Is this a work-queue type pattern?

On Wed, Aug 8, 2018 at 6:10 PM, Matt Farmer <ma...@frmr.me> wrote:

> Oh, almost forgot, thanks for the KIP - I can see this being a very useful
> addition. :)
>
> On Wed, Aug 8, 2018 at 9:09 PM Matt Farmer <ma...@frmr.me> wrote:
>
> > Is it worth spelling out explicitly what the behavior is when two topics
> > have the same priority? I'm a bit fuzzy on how we choose what topics to
> > consume from right now, if I'm being honest, so it could be useful to
> > outline the current behavior in the background and to spell out how that
> > would change (or if it would change) when two topics are given the same
> > priority.
> >
> > Also, how does this play with max.poll.records? Does the consumer read
> > from all the topics in priority order until we've hit the number of
> records
> > or the poll timeout? Or does it immediately return the high priority
> > records without pulling low priority records?
> >
> > On Wed, Aug 8, 2018 at 8:39 PM <ni...@afshartous.com> wrote:
> >
> >>
> >> Hi All,
> >>
> >> Calling for a vote on KIP-349
> >>
> >>
> >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> 349%3A+Priorities+for+Source+Topics
> >> <
> >> https://cwiki.apache.org/confluence/display/KAFKA/KIP-
> 349:+Priorities+for+Source+Topics
> >> >
> >>
> >> Cheers,
> >> --
> >>       Nick
> >>
> >>
> >>
> >>
>



-- 
*Gwen Shapira*
Product Manager | Confluent
650.450.2760 | @gwenshap
Follow us: Twitter <https://twitter.com/ConfluentInc> | blog
<http://www.confluent.io/blog>

Re: [VOTE] KIP-349 Priorities for Source Topics

Posted by Matt Farmer <ma...@frmr.me>.
Oh, almost forgot, thanks for the KIP - I can see this being a very useful
addition. :)

On Wed, Aug 8, 2018 at 9:09 PM Matt Farmer <ma...@frmr.me> wrote:

> Is it worth spelling out explicitly what the behavior is when two topics
> have the same priority? I'm a bit fuzzy on how we choose what topics to
> consume from right now, if I'm being honest, so it could be useful to
> outline the current behavior in the background and to spell out how that
> would change (or if it would change) when two topics are given the same
> priority.
>
> Also, how does this play with max.poll.records? Does the consumer read
> from all the topics in priority order until we've hit the number of records
> or the poll timeout? Or does it immediately return the high priority
> records without pulling low priority records?
>
> On Wed, Aug 8, 2018 at 8:39 PM <ni...@afshartous.com> wrote:
>
>>
>> Hi All,
>>
>> Calling for a vote on KIP-349
>>
>>
>> https://cwiki.apache.org/confluence/display/KAFKA/KIP-349%3A+Priorities+for+Source+Topics
>> <
>> https://cwiki.apache.org/confluence/display/KAFKA/KIP-349:+Priorities+for+Source+Topics
>> >
>>
>> Cheers,
>> --
>>       Nick
>>
>>
>>
>>

Re: [VOTE] KIP-349 Priorities for Source Topics

Posted by Matt Farmer <ma...@frmr.me>.
Is it worth spelling out explicitly what the behavior is when two topics
have the same priority? I'm a bit fuzzy on how we choose what topics to
consume from right now, if I'm being honest, so it could be useful to
outline the current behavior in the background and to spell out how that
would change (or if it would change) when two topics are given the same
priority.

Also, how does this play with max.poll.records? Does the consumer read from
all the topics in priority order until we've hit the number of records or
the poll timeout? Or does it immediately return the high priority records
without pulling low priority records?

On Wed, Aug 8, 2018 at 8:39 PM <ni...@afshartous.com> wrote:

>
> Hi All,
>
> Calling for a vote on KIP-349
>
>
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-349%3A+Priorities+for+Source+Topics
> <
> https://cwiki.apache.org/confluence/display/KAFKA/KIP-349:+Priorities+for+Source+Topics
> >
>
> Cheers,
> --
>       Nick
>
>
>
>