You have just seen that for every separate consumer, separate consumer group will be created automatically.
And now let's create custom consumer group and let's name it no as a group.
And let's again read messages from the same topic as before topic numbers.
Let me go up at this command.
Let's keep this producer up and running.
Let's open up New Tab City to Kafka and here paste, come on again.
This will create the new consumer in a new group called Numbers Group.
And this consumer will read messages from topic numbers.
And as you'll see here, we have received all messages that were produced before.
We have produced numbers from one to five.
And that's reasonable because now we have only a single consumer in the consumer group.
Let's keep this consumer running.
Let's open up New Tab City to Kafka and the now read the tales about consumer groups.
And let's first list all groups like this copied this command based here.
And now I see another consumer group here on the list, and it is a non-profit group, and noticed that
the previous automatically created consumer groups are still here, but please just ignore them.
We are interested now in this group numbers group.
Let us know Riverdale's about this group.
And here, let's use this comment with describe option.
And here in a group name will be numbers.
This group like this.
Let's go up to this command.
Clear time and all here and past comments like this.
Let me make it a bit smaller like this.
Actually, this output looks very small on your screen, so let me just add the following.
Let's get rid of numbers, a group, and let's just agreed the group numbers, pretty short name.
Let's go to list of commands and replace numbers, a group everywhere with numbers.
So let's replace numbers group with numbers like this.
Replace all.
And now let's restart our consumer here.
Let's stop this one and let's start it over again in group numbers.
So let me go to this command where we have started consuming and now a group name will be simply names.
So let me copy it pasted here again.
We have consumed all messages and now let me go to this step back.
And instead of numbers, a group here will be just numbers.
Like this.
And now let me make it a bit larger.
And now we have a bit more space.
Let me repeat this comment and let me describe now what you see here in this hour.
First of all, U.S. consumer group, and it is Noma's in our case topic is numbers.
Here you see five partitions and now you see current of offsets for all partitions.
And in this column, you see Comi offset by consumers.
In my case, I see current offset for four, partition three and current offset one for partition four.
And from this output, you could understand how many messages are currently stored in specific partition,
which will produce the Justifier messages.
So from here they and all those five messages were spread across five different partitions.
And in my case, it happened in such a way that four of math, just where I thought in partition with
India three and one more message was thought in partition for Let's Not.
We did the following in order to ensure that this table accurately reflects a picture of distribution
of messages across different partitions.
Let's not quickly start one more consumer without customer consumer group.
And let's try to read messages from a specific partition.
And you could read from partition where you see one or two messages and I'll read in my case from Partition
with ID from let's go to our commands list and the list copied this command.
Where are we able to start consumer and the let's start console consumer and read from a specific partition.
Like this, and here will be partition.
In my case, I'll read from protection with Deep for like this, and we want to read from beginning,
let's add here option from beginning.
Like this, don't forget.
Let me copy this comment, open up new tab here, city to Kafka and let's start one more consumer and
with messages from protection for in my case and I just Google message, and that means that this table
is accurate and correct.
It shows the Protestant with a default in my case has just a single message.
Again, in this table, you see the tales about the consumers in specific consumer groups.
And we are reading now details about consumer group gold numbers.
And in this consumer group at the moment, there was just a single consumer hearing this week of just
launched one more consumer.
But now we are safe to stop it and simply close the step.
We don't need it anymore.
Again, in group numbers, we have just single consumer at the moment.
And that's why here in this column with consumer ID, you'll see same consumer ID for all politicians.
And that means that the single consumer is or we don't know from all politicians.
And so far this consumer has consumed all five messages that exist in this topic numbers.
And that's why here in this column, look and I've said you see same numbers that are equal to current
offset numbers here.
In my case, AC4, same us here and here I see one.
Same as here in this column.
And again, those numbers are committed of self for particular consumer.
This consumer with this ad has committed that it has received all four messages from this topic.
Let's not produce one more message to our Closter.
Let's go to producer and produce message six like this.
Let's go back to consumer, it has received this message.
Let's go back to the step and read details about consumer group.
And now I see that quantity of messages in partition with 84 was increased to two.
Current of is two and look and offset is two.
And that means that this consumer with this idea has successfully received both messages in this particular
partition.
Next column after look and offset is gold leg.
And at the moment we see here all zeros, but you'll see here non-zero numbers if specific consumer
has not yet consumed all messages that are present in specific position.
And that may happen when producers produce faster than consumer is able to consume.
In the next column, consumer ID, you see consumer ID that was created automatically and consumer ID
must be unique for every connection to Kafka.
Gloster also you'll see here columns, host and client ID.
Client ID is usually the same for all consumers in specific consumer group.
And as you see, it consists here of a prefix consumer, then name of the group and then no one in the
host.
Golman you'll see actually apologists of the computer where consumer is located.
Wonderful.
That's how our picture looks like in a case when we have started only a single consumer in a consumer
group.
Let's make things more interesting.
And the next start, one more consumer in the same consumer group called NOM's.
Let's do the next buy by.