In their onPartitionsRevoked() callback listeners. The sticky assignment strategy can provide some optimization to those consumers that have some partition cleanup code ![]() Sticky (preserves 5 partition assignments): Round Robin (preserves 3 partition assignments): Now, if consumer C0 is removed, these two assignors would produce the following assignments. Which is not as balanced as the assignment suggested by sticky assignor: The round robin assignor would come up with the following assignment: T0, t1 and C2 is subscribed to t0, t1, t2. C0 is subscribed to t0 C1 is subscribed to Therefore, the partitions are t0p0, t1p0, t1p1, t2p0, There are three consumers C0, C1, C2,Īnd three topics t0, t1, t2, with 1, 2, and 3 partitions respectively. Preserving all the previous assignments (unlike the round robin assignor).Įxample 2. No need to struggle with remembering long and complicated passwords Sticky Password is your award-winning password management and form filler solution. While the sticky assignor would result in: Now, let's assume C1 is removed and a reassignment is about to happen. The assignment with both sticky and round robin assignors will be: Each consumer is subscribed to all three topics. Resulting in partitions t0p0, t0p1, t1p0, t1p1, t2p0, Suppose there are three consumers C0, C1, C2,įour topics t0, t1, t2, t3, and each topic has 2 partitions, Of course, the first goal above takes precedence over the second one.Įxample 1.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |