Subject: Process for changing producer partition assignment strategy


In Kafka Streams the producer config `PARTITIONER_CLASS_CONFIG` does not
take effect, because Kafka Streams computes and set partition numbers
explicitly and thus the producer does never use the partitioner to
compute a partition, but accepts whatever Kafka Streams specifies on
each `ProducerRecord`.

If you want to change the partitioning strategy, you need to implement a
custom `StreamPartitioner` and pass it into the corresponding methods.
For example, `to()` or `through()`.

Hope this helps.
-Matthias

On 11/14/19 9:51 AM, Mikkel Gadegaard wrote:
Comment: GPGTools - https://gpgtools.org

iQIzBAEBCgAdFiEE8osu2CcCCF5douGQu8PBaGu5w1EFAl3OYBYACgkQu8PBaGu5
w1EoFg//YayOLTD/RN7rrLn8UjTRPJsLddp3jwSEjwVB7UWIqOvWhybWbheKEF3V
mGKiQbIsCMB1ThPymJSDz9bbzYRXkduIEkyH7UD7PTS8tkkHpwZ8wiJ3WiAieX4k
sw1kzfs3+nYCbNqtvMTHFeWIiJZ5ECkDvnZsyItX8S/InG6YwSQk4O4tflAcL77t
m+jzcwHLfSQou/z8ZCv1lOj1wc9rE1fUn7BeiQXEdDvI69tQnSlsg6p0ufAe1wqq
v8FLukioFccX5U2W4L6CQibmpPNUCsC2lKCDkUPZ1aMp6pgmKwGIzgmWiYT2O8Ix
UXPUOs4aSlfC58PrH2DzVSBToj8+GR63bEoLLpez0jGLqPaM7l5mGSBKv47Jenyy
2Gsvf+g2uleyAw48T1yDF3PUXZIUSU84Yb1V5MCSp/m4OkBzHRH2xHxB8WGbdH+K
bCtiMVZoxgrEGBn4zINKjGzlTigm6CV4zvxiXBjDcg2fUBNMcjXFUhjQgg62mgfB
pGwDgIbhDM5MnKthOoKTzN2FfWZunJzUp9tBJ7m+UUBRpObrU00tao1Kq04bCFnA
gwLmVGqUiIJ5YrQFW4Cn/bvKJ4kndwGKkTHOGhqKAw9Vgaj/EDfkFQWzGXXyMarC
UD2xmSrTXyRaNzYp9pLGSVnqo0GFjayuFK2FWkfDzHNmSOIEZ30=
=6Dwc
-----END PGP SIGNATURE-----