We have just analyzed what is happening now in our Closter in the group numbers, and at the moment
there was just a single consumer.
It is raining here and that's why this consumer is now connected to all politicians.
And that's why here in this column, you see same consumer ID.
And though it's a great time to start one more consumer in the same consumer group numbers, let's do
that.
Let's go to the list of comments and find comments that will start console consumer in specific group
here with these.
And let's also read messages from beginning.
And again, please notice that here we specify group and in our case, group is NAMS.
So let's copy this comment.
Open up new tab.
Let me move it here.
And the city to Cafcass usually and the run consumer here again, we are starting to want more consumer
in the same group numbers and notice that in council after execution of this command, we see empty
output.
No single message was consumed by this consumer, but we have added here from beginning option.
What happens, why no messages were received by this consumer answer was pretty simple.
There was another consumer in the same group, NOM's, that has already consumed all messages in this
topic numbers.
That's why this consumer gets nothing before producing one or two and other messages.
Let's go to this step, last one, where we can read details about the group numbers and let's read
those details now.
So.
And now you should see a bit different picture and difference is here in consumer I.D. column.
Now you should see here two different IDs and in my case, previous consumer with this idea is still
connected.
And the consumers messages from partitions, zero, one and two and new consumer with new ID here or
this is connected now to two remaining partitions, to partitions with IDs, three and four.
And now you see that partitions where actually equally spread across different consumers.
Now there are two consumers in a group in total file partitions, and it's fair that one consumer will
get three partitions and another will get two partitions.
That's how picture looks like at the moment.
Let's now go to producer and producer one additional message and see which consumer will get this message.
So let's go to producer and produce number seven.
And I see it that Mikey's first consumer has consumed this message, and second, consumer remains silent,
it does not get the same message because no messages will be spread across different consumers.
And if one of the consumers receives one of the messages, same message will not be received by remaining
consumers.
That's actually the idea behind the creation of multiple consumers in the same group.
Let's now go back to the last step and execute same comment and raillery details about this NOM's group.
And now I see that in my case, this last message has landed in competition with to.
Consumer with this ad is my first consumer is connected to this protection.
That's why this consumer has consumed this message.
Let's produce one or two additional messages.
So here comes number eight and nine.
And I see that second consumer in my case has received both messages, eight and nine.
And I could predict that those two messages were written to either partition three or partition four,
because now my second consumer is connected to those two partitions.
But it's more correct to say that those two partitions were assigned to the second consumer.
Let's execute this command.
And yes, I see that one of the messages was written to partition three and another one was written
to partition with a default, and those partitions are assigned to second consumer.
That's why this consumer has received those messages.
Let's now start one more consumer in the same group, but let's make apples and do the next by.