-1

I have a kafka topic, where I'm storing car position data. I need to write a stream which show me only the last 4 coordinates for each car. How can I do this in kafka streams?

Ray
  • 3,084
  • 2
  • 19
  • 27
mi.mo
  • 81
  • 2
  • 6

1 Answers1

1

You can use a windowed aggregation per car with the aggregation result being a list of the last 4 position records. Check out the docs and example how to do a window aggregation in general.

Matthias J. Sax
  • 59,682
  • 7
  • 117
  • 137