Reputation: 411
I want to know the recommended way to process messages on kafka topic in atomic manner so for example let'a assume kafka producer is publishing multiple messages with key k1, k2, k3 and now I want to process them atomically and let my application know about these messages together. There can be some work around to achieve this so for example pass id and count along with all messages which need to be processed together so that client waits until it receives all messages part of the same group. Is there some other recommended way to solve such problems with kafka i.e ability to process a batch of messages atomically so that consistency could be maintained across the keys. Does kafka consumer provides such ability?
Upvotes: 1
Views: 1282
Reputation: 8213
Aspects to address when producing
Now you have basic needs satisfied, for rest of the work you can choose different paths.
camel-kafka
and aggregator
EIP to consume this topic and write to a different topic where each record is the whole group message and then you know you can consume from that topic atomicallyUpvotes: 1