Re: Kafka delaying message

2019-05-26 Thread Kamal Chandraprakash
If you have a dedicated topicPartition for delayed messages, you can pause that partition for 15 min to avoid blocking the polling thread. On Thu, May 2

Re: Kafka delaying message

2019-05-22 Thread Adrien Ruffie
Thank a lot ! That's what I thought, out of the box ... but it's clearly logic I will take your solution in the consumer, but I will refactor my Java code part, because, it's a spring message listener with annotation. So, I think, I couldn't do it simply with spring. thank again, best regards Adr

Re: Kafka delaying message

2019-05-22 Thread Jonathan Santilli
Maybe you could: 1.- Disable auto.commit on the consumer side. 2.- Consume messages, one by one in each poll. 3.- Check the record timestamp a.- If the timestamp is >= desired window (time slot), process it and commit offset b.- If the timestamp is < desired window (time slot), do not proc

Re: Kafka delaying message

2019-05-22 Thread Peter Bukowinski
I’d suggest using separate topics for messages that require delay and ones that do not. If you are limited to a single topic, then I’d use some other metadata to differentiate messages that require delayed processing from ones that do not. If you do not want to block the polling thread, you’ll n

Re: Kafka delaying message

2019-05-22 Thread Pavel Molchanov
This solution will block receiving polling thread for 15 minutes. Not good. What should we do if a topic has messages that should be processed immediately and delayed messages at the same time? *Pavel Molchanov* On Wed, May 22, 2019 at 2:41 PM Peter Bukowinski wrote: > There is no out-of-the

Re: Kafka delaying message

2019-05-22 Thread Peter Bukowinski
There is no out-of-the-box way to tell a consumer to not consume an offset until it is x minutes old. Your best bet is encode the creation time into the message themselves and add some processing logic into your consumer. Let’s assume your topic has a single partition or your partitions are keye

Re: Kafka delaying message

2019-05-22 Thread Pavel Molchanov
Andrien, Thank you for asking this question! I have the same problem and wanted to ask the same question. I hope that someone will answer soon. *Pavel Molchanov* On Wed, May 22, 2019 at 9:54 AM Adrien Ruffie wrote: > Hello all, > > I have a specific need and I don't know if a generic solutio