Re: A question about kafka streams API

2018-09-18 Thread John Roesler
Hey Yui, Sorry, I haven't had a chance to respond. I've got a pretty busy couple of weeks coming up, so I don't know when I'll look at this, but I find this puzzling. I'll save your email and try what you said to see if I can figure it out. Thanks for the repro code. Let me know if you figure it

Re: A question about kafka streams API

2018-09-13 Thread Yui Yoi
Hi Adam and John, thank you for your effort! We are implementing full idem-potency in our projects so that's nothing to worry about. As to what John said - we only have one partition, I personally assured that. So as i wrote in section 2. of my first message in this conversation - my stream should

Re: A question about kafka streams API

2018-09-12 Thread John Roesler
Hi! As Adam said, if you throw an exception during processing, it should cause Streams to shut itself down and *not* commit that message. Therefore, when you start up again, it should again attempt to process that same message (and shut down again). Within a single partition, messages are

Re: A question about kafka streams API

2018-09-12 Thread Adam Bellemare
Hi Yui Yoi Keep in mind that Kafka Consumers don't traditionally request only a single message at a time, but instead requests them in batches. This allows for much higher throughput, but does result in the scenario of "at-least-once" processing. Generally what will happen in this scenario is

Re: A question about kafka streams API

2018-09-12 Thread Yui Yoi
Hi Adam, Thanks a lot for the rapid response, it did helped! Let me though ask one more simple question: Can I make a stream application stuck on an invalid message? and not consuming any further messages? Thanks again On Wed, Sep 12, 2018 at 2:35 PM Adam Bellemare wrote: > Hi Yui Yoi > >

Re: A question about kafka streams API

2018-09-12 Thread Adam Bellemare
Hi Yui Yoi Preface: I am not familiar with the spring framework. "Earliest" when it comes to consuming from Kafka means, "Start reading from the first message in the topic, *if there is no offset stored for that consumer group*". It sounds like you are expecting it to re-read each message

A question about kafka streams API

2018-09-12 Thread Yui Yoi
TL;DR: my streams application skips uncommitted messages Hello, I'm using streams API via spring framework and experiencing a weird behavior which I would like to get an explanation to: First of all: The attached zip is my test project, I used kafka cli to run a localhost broker and zookeeper