Skip to main content

Re: Partition assignment in kafka streams

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIzBAEBCgAdFiEE8osu2CcCCF5douGQu8PBaGu5w1EFAl1CKNEACgkQu8PBaGu5
w1GT0Q/7BfXlIVf2JEUmibXpXSH9lhtzM9T/It3DEm1Nh/+EmQOPywKSwPclgr26
Y3eKeK2TO3B94E72sXoSBpe1aH1yv8Y+j/UrisxW7AggWvBZgUOwe6b6OGNwwfB6
96fgzAXib85Dvbo4ac5urRwW+P3C/kZCmvWWebE9UKPKcgwxD9pm6M1fsrqF0BVd
u14GNBxKItTL2at/SoN3ckXBHm6RKcCC6yFvxWsIlqdF46Qy+7MvK2tp4PL+e3je
YLnJy+oPdv+KepCTu+s4O9kKEOHhAWioQPgCXBC4Ipm19vPgnth+vSCnVfEs8P1H
VC6TWGL+Jw87V8MuH7CRVdTrj5TO5gQpy1mGVpdLYTnvEFWQzPj60KV0P+O7x1Gc
rTHyEMXJRXW5t/oQXCsLeWbHykhQRnPNt9dUSQnwO87JiGcV3CGqqsLbugpxck9x
9+ZAL+InE7uxc7HZgM4j7P2HBUqC4djPLCuOUDtgA0Vk9Xg9ycPm7CrGfJqv5bOw
yx3UhQc3+/RmqDW7dM5XnGVbOoDND9xs8TkBLtEzWzcslFbHOHTVV9OkWbpg3OOh
CMXXXpN+sYOvjwFc4xZOsFXurPjyX+BdYpB1vetr4HMrtMtaRiUuooFCQrpFgGnp
TpwOUsLo3oENpnHYKi/qxRZtnT5C2O+wMNPInbL0ulx07qGoTwM=
=zdgH
-----END PGP SIGNATURE-----
You cannot hook into partition assignment, and I am not sure what you
exactly want to do.

You can get local assignment metadata via
`KafkaStreams#localThreadMetadata()` though.

Hope this helps.


-Matthias

On 7/29/19 11:29 PM, Navneeth Krishnan wrote:
> Hi All,
>
> The main reason for knowing the partitions is to have a localized routing
> based on partitions assigned to set a stream tasks. This would really help
> in my use case.
>
> Thanks
>
> On Mon, Jul 29, 2019 at 8:58 PM Navneeth Krishnan <reachnavneeth2@gmail.com>
> wrote:
>
>> Hi,
>>
>> I'm using the processor topology for my use case and I would like to get
>> the partitions assigned to a particular stream instance. I looked at the
>> addSouce function but I don't see a way to add a callback to get notified
>> when partition assignment or reassignment happens. Please advise.
>>
>> Thank you
>>
>

Comments