<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Kafka on Firmino Changani</title>
    <link>https://firmino.work/tags/kafka/</link>
    <description>Recent content in Kafka on Firmino Changani</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-UK</language>
    <managingEditor>hi&#43;blog@firmino.work (Firmino Changani)</managingEditor>
    <webMaster>hi&#43;blog@firmino.work (Firmino Changani)</webMaster>
    <copyright>Firmino Changani</copyright>
    <lastBuildDate>Tue, 03 Nov 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://firmino.work/tags/kafka/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Kafka - Unkeyed records, where do they go?</title>
      <link>https://firmino.work/blog/kafka-unkeyed-records-where-do-they-go/</link>
      <pubDate>Tue, 03 Nov 2026 00:00:00 +0000</pubDate><author>hi&#43;blog@firmino.work (Firmino Changani)</author>
      <guid>https://firmino.work/blog/kafka-unkeyed-records-where-do-they-go/</guid>
      <description>Records published on Kafka can be keyed or unkeyed and such a property defined at the producing stage, determines where Kafka stores the record.&#xA;Ordering guarantees By default, keyed records are guaranteed to be ordered within a single partition due to Kafka&amp;rsquo;s default partitioner strategy that consistently places records in a specific partition for a given a key and a partition count. The formula used to compute the partition number is as follows: partitionNumber = MurmurHash(key) % partitionCount.</description>
      <content:encoded><![CDATA[<p>Records published on Kafka can be keyed or unkeyed and such a property defined at the producing stage, determines where Kafka stores the record.</p>
<h2 id="ordering-guarantees">Ordering guarantees</h2>
<p>By default, keyed records are guaranteed to be ordered within a single partition due to Kafka&rsquo;s default partitioner
strategy that consistently places records in a specific partition for a given a key and a partition count. The formula
used to compute the partition number is as follows: <code>partitionNumber = MurmurHash(key) % partitionCount</code>.</p>
<p><img alt="/images/posts/kafka-unkeyed-records-where-do-they-go-img-1.png" src="/images/posts/kafka-unkeyed-records-where-do-they-go-img-1.png"></p>
<h2 id="where-do-unkeyed-records-go">Where do unkeyed records go?</h2>
<p>Whenever ordering is not important, then there is no need to produce records with a key, and when that is the case
Kafka&rsquo;s default partitioner will distribute the records evenly across all partitions, and it does so in batches.</p>
<p><img alt="/images/posts/kafka-unkeyed-records-where-do-they-go-img-2.png" src="/images/posts/kafka-unkeyed-records-where-do-they-go-img-2.png"></p>
]]></content:encoded>
    </item>
  </channel>
</rss>
