We have just seen this output to help our officials were spread across different broadcasts and here
you see which broker is leader for particular party, for example, Broecker was added to is leader
for partition with one Nola's deforming.
Let's first start consumer.
Let's stop this one and read all messages.
Begin for that.
Let's go to our Carman's list, this one, and let's read messages from topic cards from beginning.
And let me also add here remaining centavos like so.
But again, please notice that it is not necessary.
You are still able to connect to an entire class by connecting just to single cell.
That's why here in this command you see option bootstrap celebra bootstrap means initial initial server
you connect to and afterwards you connect to the entire class.
OK, so let me copy this.
Come and go here.
Clear terminal and based command here and execute it.
And I'll get all five messages that were produced by a producer here and notice again that all those
messages were received not in the same order as we will produce them.
And I have explained it to you in a previous example or that we won't be the same if you read from multiple
partitions.
And in our case, our topic cards has five different partitions.
But again, notice that we have received all messages.
It means that all brokers are up and running.
Now, let's stop this consumer like soul and let's simulate failure of one of the brokers.
Afterwards, we will start consumer again and see whether we will be able to receive all messages or
not.
So let's go, for example, to this broker and this broker, his idea to and let's simply stop it.
Control, see.
Broker will stopped and there are only two brokers with ÉDITH zero and one in our class, so we can
verify that quickly using this comment.
Let me scroll up this one.
So at least the ideas of brokers and the people who in this comment based here.
And I'll see Arae only of two, Idiz zero and one, and that's fully correct because broker with the
two is down.
OK, let's now go to Consumer Step and try to read messages again from beginning.
So same command and.
And I got following up, if I screwed up, I will see that three messages were received Dassler, Honda
and.
And also I see a bunch of warnings that indicate the two partitions have leader brokers without imagining
Lisner, including cars four and cars one.
And this warning tells us that there are two partitions that actually are not available and we are not
able to read messages from those partitions.
And after starp of this consumer, you'll see that in total recall protest, only three messages instead
of five.
It means the two messages were simply lost.
And the reason for that is pretty, pretty simple.
There were three bloggers and each of them had part of old messages and there was no indication of farter.
And that means that two remaining messages that we haven't received here by this consumer, we are simply
lost.
When Broecker went down.
Let's not to the following.
Let's try to read the details about Karl's topic.
Now, here you see previous output when all brokers were alive.
So let's repeat the same comment.
If you don't have to step open, please go to this file and copy a command that will read the details
about specific topic, this one and executed.
So after.
And now I see here following big mortician's zero, two and three are still available, and here you
see correspondant leader ads for them here, here and here.
But partitions, one and four are not available and leader is marked here as none.
And that means that those partitions are technically not available right now.
Now, let's suppose that after a short period of outage, Broecker two will come up again.
So let's start over.
Go to Carmine's list and copied this comment.
It was the start of Breuker with decided to let me get you to go to this step where we have started
Broecker with a little let me clear it and paste command.
Starting.
And Broecker was successfully launched again, let's go back to the STEIB, where we have details about
a specific topic and let's read them again.
So details about Tropicana's.
And now I see again that leader with Ideato is active for partizan one and for and situation is back
to normal.
Let's go to Consumer back and let's launch it again and read messages from beginning.
And now we have again read the old file that's just like that in our current topic, and we don't receive
any warnings.
That's what happens when some of the brokers goes down and afterwards, after some period of time,
goes up again.
And notice that in our case, we have actually lost some messages because they were stored without any
replication in our case.
And this example, replication of fact or for this particular topic is one.
And that means that messages are not obligated to other brokers.
Wonderful.
That's all for this example.
And next, let's quickly summarize what we did here.
See you next.
Bye bye.