1

Assume Kafka consumer has to consume 5 messages and these will be processed in A class & B class.

5 Messages --> KAFKA CONSUMER --> PROCESS A CLASS ---> PROCESS B Class

My question is: Whether all 5 messages will be consumed immediately (one by one) or is there any time period to consume one data after next message. Reason for this question is if Message 1 is consumed in the above flow and PROCESS B class takes longer time. Whether Message 2 will be consumed before PROCESS B class completes for Message 1.

Manoj Vadehra
  • 836
  • 4
  • 17
Manoj
  • 11
  • 1
  • The question is not quite clear. What situation are you trying to avoid? Do you want to process and commit an event before receiving the next one? -- which would mean that you need to fetch a batch-size of exactly 1 (by setting max.poll.records to 1) – Manoj Vadehra May 11 '19 at 16:22
  • 1
    Are you asking if the consumer is multi-threaded and processing multiple messages concurrently? – Darius X. May 11 '19 at 21:16
  • Is it possible to consume ONE data and process necessary logic then i need to consume the next data.Whether we can control the consumer part. Also let me know whether consumer is multi-threaded and can process multiple messages concurrently ? – Manoj May 11 '19 at 23:45

0 Answers0