Now let's discuss how consumers may consume messages from a specific topic, usually every consumer
is connected just to one topic, but it is possible to connect to multiple topics as well and to consumer
messages from multiple topics on this diagram, U.S. consumer that is connected to topic A and IT consumer
messages from that topic.
And you are able to consume messages either from all politicians or just one politician if you want,
or from several politicians and you are able either to consume messages from beginning.
In such case, you can tell Coffeecake lost or that you want to consume messages from beginning.
And in such case, messages starting from offset number zero will be consumed by that consumer.
But of course, if some messages were already deleted to do it, the retention period, for example,
messages zero and the one where are deleted by Broecker, then in such case of this consumer will start
consumption only from a set number two.
Also, you are able to start the consumer from the current state, and that means that the consumer
will receive only new messages that will arrive to specific partitions.
In such case, it will just wait for your messages and receive them as soon as they will be produced
by producers.
Although it is possible to create multiple consumers that will consume messages from the single topic.
And in such case, those multiple consumers will belong to consumer group.
And in such case, every single message may be consumed only by one of the consumers in the consumer
group.
Also, when consumer connects to Kafka Gloster, you are able to specify a specific offset number you
want to start reading messages from.
For example, you could say that you want to read messages from offset number two and in such case,
you will consume this message, this message, this one, and that's all.
And after that, you will wait for new messages.
Also, this is important to understand that the messages inside of the brokers will be a reminder,
independent of the status of the message by specific consumer.
What I mean.
For example, let's say that all those messages were already consumed by this consumer, but it doesn't
impact other consumers.
If someone else will want to read the same messages, then Kafka broker will allow to do that.
No problems at all because Kafka is published subscriber system and any quantity of subscribers are
able to read messages stored in Kafka Breuker.
That's that simple.
Okay, that's all about the reading matter just by consumers.
And of course, you are able to have multiple consumers that will read data in Parral.
No problem at all.
OK, that's all also for this section.
And here in this section, I tried to make just short and quick overview of main concepts of Kafka infrastructure.
And now I hope that you understand all of them and we are able to move on.
And in the next section, we will get back to practice activities and launch coffeecake stories.
Multiple brockers.
I'll demonstrate you how leader is elected, how different partitions are assigned to different brokers
and so on.
So in the next section we will try multiple things that we have discussed here in this section and we
will do that on practice.
So see you in the next section and by my.