{"id":6923,"date":"2019-03-26T15:49:44","date_gmt":"2019-03-26T20:49:44","guid":{"rendered":"http:\/\/appcrawler.com\/wordpress\/?p=6923"},"modified":"2019-03-26T15:49:46","modified_gmt":"2019-03-26T20:49:46","slug":"adding-a-partition-in-kafka","status":"publish","type":"post","link":"http:\/\/appcrawler.com\/wordpress\/2019\/03\/26\/adding-a-partition-in-kafka\/","title":{"rendered":"Adding a partition in Kafka"},"content":{"rendered":"\n<p>The impact is pretty clear.  Below we load ten events using a given key.  We add a partition, then load ten more events.  Notice the partition differs after adding a partition, even though the key is the same.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Steve-Howards-MBP13:confluent-5.1.2 steve.howard$ for i in {1..10}; do java ProducerDemo 2>\/dev\/null | grep Partition; done | sort | uniq -c\n  10 Partition:1\nSteve-Howards-MBP13:bin steve.howard$ .\/kafka-topics --zookeeper localhost:2181 --topic bar --alter --partitions 4\nWARNING: If partitions are increased for a topic that has a key, the partition logic or ordering of the messages will be affected\nAdding partitions succeeded!\nSteve-Howards-MBP13:confluent-5.1.2 steve.howard$ for i in {1..10}; do java ProducerDemo 2>\/dev\/null | grep Partition; done | sort | uniq -c\n  10 Partition:0\nSteve-Howards-MBP13:confluent-5.1.2 steve.howard$ <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The impact is pretty clear. Below we load ten events using a given key. We add a partition, then load ten more events. Notice the partition differs after adding a partition, even though the key is the same.<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/appcrawler.com\/wordpress\/2019\/03\/26\/adding-a-partition-in-kafka\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"footnotes":""},"categories":[69,107,1],"tags":[],"_links":{"self":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/6923"}],"collection":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/comments?post=6923"}],"version-history":[{"count":1,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/6923\/revisions"}],"predecessor-version":[{"id":6924,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/posts\/6923\/revisions\/6924"}],"wp:attachment":[{"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/media?parent=6923"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/categories?post=6923"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/appcrawler.com\/wordpress\/wp-json\/wp\/v2\/tags?post=6923"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}