# Can we get data in order?

**URL:** <https://forum.confluent.io/t/can-we-get-data-in-order/1428>\
**Category:** Clients\
**Created:** [8 April 2021 13:19 UTC](https://forum.confluent.io/t/can-we-get-data-in-order/1428 "2021-04-08T13:19:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![shubhamshirur](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@shubhamshirur](https://forum.confluent.io/u/shubhamshirur)\
**Post date:** [8 April 2021 13:19 UTC](https://forum.confluent.io/t/can-we-get-data-in-order/1428/1 "2021-04-08T13:19:02Z")

</div>

It’s difficult to pull data in order out of kafka due to it’s high scalability and parallelism. But at sink client side if we reverse the algorithm or reverse the work of partitioner after fetching data out of kafka brokers, is it possible to get data in order?

---

<div class="post-metadata">

**Author:** ![miguno](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/miguno/32/171_2.png) [@miguno](https://forum.confluent.io/u/miguno)\
**Post date:** [9 April 2021 07:33 UTC](https://forum.confluent.io/t/can-we-get-data-in-order/1428/2 "2021-04-09T07:33:01Z")

</div>

> It’s difficult to pull data in order out of kafka due to it’s high scalability and parallelism.

Data stored in Kafka is strongly is ordered by topic-partition. I suppose what you are referring to is that Kafka does not provide total ordering _across the partitions_ in a topic?

> But at sink client side if we reverse the algorithm or reverse the work of partitioner after fetching data out of kafka brokers, is it possible to get data in order?

If you indeed mean what I said above, then Yes, you can of course reorder (and/or filter, drop, modify, etc.) received events in a consuming application in the way you need it.

Be aware that you also have to account for—what we call—out-of-order and late data. This is data that is out-of-order or late for a different reason, e.g. because producing applications lost network connectivity for a period of time (like a mobile device losing Internet connectivity while aboard an airplane), or because the local time clocks of producing applications are not properly synced with NTP. This out-of-orderness has nothing to do with how Kafka works, and instead is a general issue you have to deal with in any streaming system.

---

<div class="post-metadata">

**Author:** ![shubhamshirur](https://avatars.discourse-cdn.com/v4/letter/s/4bbf92/32.png) [@shubhamshirur](https://forum.confluent.io/u/shubhamshirur)\
**Post date:** [13 April 2021 14:38 UTC](https://forum.confluent.io/t/can-we-get-data-in-order/1428/3 "2021-04-13T14:38:44Z")

</div>

Thank you so much @miguno. It is clear to me now.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [20 April 2021 14:39 UTC](https://forum.confluent.io/t/can-we-get-data-in-order/1428/4 "2021-04-20T14:39:40Z")

</div>

Closed on 20 April 2021 14:39 UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
