In the previous example, we have started multiple consumers in the same consumer group and we have
verified that the participants were spread equally across different consumers in the same consumer group.
And now short challenge for you.
In the previous example, we have used the consumer without a middle class.
Now you should use glass gold consumer with partitions assignment this one, please try to start multiple
copies of this main method and see how messages will be received by different consumers in the same
group.
Please pause.
We do now launch multiple consumers afterwards, start produce a produce some massages and the next.
Observe how messages will be received by multiple consumers in this third group.
And afterwards, please try to explain yourself why behavior is different from behavior.
In previous example, when we have used consumer was all to commit glass.
I wish you good luck.
OK, are you going to do it myself, but I'll give you a short explanation in the previous example,
we have used subscribe method of the consumer.
In this glass, we use a sign method of the consumer.
In such case, every consumer independent of the assignment to consumer group will receive all messages
from partitions that were assigned to this consumer.
Because actually you performed manual assignment of the partitions with subscribe method.
You actually allow Coffeecake last or to perform assignment of partitions to different consumers in
the same consumer group.
This explanation for this challenge, and that's all for this section.
I'll see it in the next one.
Bye bye.