Re: KafkaStreams aggregation with multiple instance

2021-05-06 Thread Pietro Galassi
Hi Neeraj, 1) I have multiple instance reading from orderTopic and using aggregate (sum). So if instance A reads and do a +1 and instance B reads and do a +1 at the same time can i have wrong count numbers (some +1 may be lost ?). Yes i'm using messageKeys and multiple partitions. 2) What state s

Re: KafkaStreams aggregation with multiple instance

2021-05-06 Thread Neeraj Vaidya
Hi Pietro, 1) What do you mean by problems in counts due to multiple instances ? Also, do you use Keys in your messages ? 2) If you want to maintain state and refer to that state when processing each message, then yes you will need a state store. A state store will also be needed if you want to

KafkaStreams aggregation with multiple instance

2021-05-06 Thread Pietro Galassi
Hi all, hi have hope you can help me figure out this scenario. I have a multiinstance microservice that consumes from a topic (ordersTopic) all of them use the same consumer_group. This microservice uses a KStream to aggregate (sum) topic events and produces results on another topic (countTopic).

KStreams and multiple instance

2021-05-06 Thread Pietro Galassi
Hi all, hi have hope you can help me figure out this scenario. I have a multiinstance microservice that consumes from a topic (ordersTopic) all of them use the same consumer_group. This microservice uses a KStream to aggregate (sum) topic events and produces results on another topic (countTopic).

Unable to put more than 3 consumers in a single process

2021-05-06 Thread Lahiru Chandima
Hi, I am trying to place multiple kafka consumers of a single consumer group in the same process. But, I am unable to put more than 3 consumers in the same process.The topic which the consumer group tries to read has 10 partitions.When I try to attach the 4th consumer, it leaves the group after t

R: kafka-consumer-groups option

2021-05-06 Thread Rovere Lorenzo
Ok I understard why I should reset the offset, but why would I want to reset to the current one? I mean, am I not always at the current offset by definition? I don't know if I am missing something, but if I describe a consumer group and I see TOPIC PARTITION CURRENT-OFFSET LOG-END-

Re: kafka-consumer-groups option

2021-05-06 Thread mangat rai
Hey Lorenzo Rovere, Consider the case where you want to reprocess all the data. Let's say your process had a bug. You fixed it and now you want to reprocess everything to produce the correct output. Similarly, there can be other use cases for resetting the consumer offsets and reprocessing the in

kafka-consumer-groups option

2021-05-06 Thread Rovere Lorenzo
Hi, I'm playing with the kafka-consumer-groups.sh command. I wanted to ask the utility of the --to-current option used to reset offsets of a consumer group to current offset. The thing I don't understand is in which scenario I would want to use this option. If I'm already at the current offset,