WEBVTT

00:04.350 --> 00:10.040
We have just seen this output to help our officials were spread across different broadcasts and here

00:10.050 --> 00:16.740
you see which broker is leader for particular party, for example, Broecker was added to is leader

00:16.740 --> 00:20.070
for partition with one Nola's deforming.

00:20.340 --> 00:22.170
Let's first start consumer.

00:22.170 --> 00:25.050
Let's stop this one and read all messages.

00:25.440 --> 00:26.790
Begin for that.

00:26.790 --> 00:32.820
Let's go to our Carman's list, this one, and let's read messages from topic cards from beginning.

00:33.060 --> 00:36.660
And let me also add here remaining centavos like so.

00:36.780 --> 00:39.190
But again, please notice that it is not necessary.

00:39.450 --> 00:44.880
You are still able to connect to an entire class by connecting just to single cell.

00:45.330 --> 00:52.680
That's why here in this command you see option bootstrap celebra bootstrap means initial initial server

00:52.830 --> 00:56.580
you connect to and afterwards you connect to the entire class.

00:57.150 --> 00:58.860
OK, so let me copy this.

00:58.860 --> 01:00.320
Come and go here.

01:00.510 --> 01:03.990
Clear terminal and based command here and execute it.

01:04.320 --> 01:10.830
And I'll get all five messages that were produced by a producer here and notice again that all those

01:10.830 --> 01:15.360
messages were received not in the same order as we will produce them.

01:15.600 --> 01:21.330
And I have explained it to you in a previous example or that we won't be the same if you read from multiple

01:21.330 --> 01:22.050
partitions.

01:22.290 --> 01:26.540
And in our case, our topic cards has five different partitions.

01:27.120 --> 01:30.150
But again, notice that we have received all messages.

01:30.330 --> 01:33.320
It means that all brokers are up and running.

01:33.870 --> 01:40.620
Now, let's stop this consumer like soul and let's simulate failure of one of the brokers.

01:41.400 --> 01:47.910
Afterwards, we will start consumer again and see whether we will be able to receive all messages or

01:47.910 --> 01:48.250
not.

01:48.810 --> 01:55.800
So let's go, for example, to this broker and this broker, his idea to and let's simply stop it.

01:56.130 --> 01:57.060
Control, see.

02:02.430 --> 02:08.940
Broker will stopped and there are only two brokers with ÉDITH zero and one in our class, so we can

02:08.940 --> 02:11.410
verify that quickly using this comment.

02:11.430 --> 02:13.520
Let me scroll up this one.

02:13.740 --> 02:18.520
So at least the ideas of brokers and the people who in this comment based here.

02:19.780 --> 02:26.620
And I'll see Arae only of two, Idiz zero and one, and that's fully correct because broker with the

02:26.620 --> 02:27.740
two is down.

02:28.440 --> 02:33.910
OK, let's now go to Consumer Step and try to read messages again from beginning.

02:34.240 --> 02:36.390
So same command and.

02:38.810 --> 02:44.960
And I got following up, if I screwed up, I will see that three messages were received Dassler, Honda

02:44.980 --> 02:45.080
and.

02:45.980 --> 02:53.800
And also I see a bunch of warnings that indicate the two partitions have leader brokers without imagining

02:53.870 --> 02:57.920
Lisner, including cars four and cars one.

02:58.400 --> 03:04.670
And this warning tells us that there are two partitions that actually are not available and we are not

03:04.670 --> 03:07.220
able to read messages from those partitions.

03:07.880 --> 03:14.000
And after starp of this consumer, you'll see that in total recall protest, only three messages instead

03:14.000 --> 03:14.560
of five.

03:14.960 --> 03:17.570
It means the two messages were simply lost.

03:18.170 --> 03:20.330
And the reason for that is pretty, pretty simple.

03:20.690 --> 03:28.390
There were three bloggers and each of them had part of old messages and there was no indication of farter.

03:28.400 --> 03:34.610
And that means that two remaining messages that we haven't received here by this consumer, we are simply

03:34.610 --> 03:35.150
lost.

03:35.330 --> 03:36.820
When Broecker went down.

03:37.280 --> 03:38.470
Let's not to the following.

03:38.750 --> 03:41.870
Let's try to read the details about Karl's topic.

03:41.870 --> 03:45.830
Now, here you see previous output when all brokers were alive.

03:46.040 --> 03:47.750
So let's repeat the same comment.

03:47.900 --> 03:53.990
If you don't have to step open, please go to this file and copy a command that will read the details

03:53.990 --> 03:56.990
about specific topic, this one and executed.

03:57.110 --> 03:58.160
So after.

03:59.740 --> 04:06.670
And now I see here following big mortician's zero, two and three are still available, and here you

04:06.670 --> 04:10.510
see correspondant leader ads for them here, here and here.

04:10.960 --> 04:17.350
But partitions, one and four are not available and leader is marked here as none.

04:17.830 --> 04:22.150
And that means that those partitions are technically not available right now.

04:22.660 --> 04:27.530
Now, let's suppose that after a short period of outage, Broecker two will come up again.

04:27.670 --> 04:28.960
So let's start over.

04:29.170 --> 04:32.160
Go to Carmine's list and copied this comment.

04:32.170 --> 04:38.930
It was the start of Breuker with decided to let me get you to go to this step where we have started

04:39.070 --> 04:42.760
Broecker with a little let me clear it and paste command.

04:44.780 --> 04:45.470
Starting.

04:46.450 --> 04:52.990
And Broecker was successfully launched again, let's go back to the STEIB, where we have details about

04:52.990 --> 04:55.660
a specific topic and let's read them again.

04:55.900 --> 04:57.730
So details about Tropicana's.

05:00.310 --> 05:08.380
And now I see again that leader with Ideato is active for partizan one and for and situation is back

05:08.380 --> 05:09.000
to normal.

05:09.280 --> 05:13.990
Let's go to Consumer back and let's launch it again and read messages from beginning.

05:15.630 --> 05:21.720
And now we have again read the old file that's just like that in our current topic, and we don't receive

05:21.720 --> 05:22.860
any warnings.

05:23.460 --> 05:29.310
That's what happens when some of the brokers goes down and afterwards, after some period of time,

05:29.580 --> 05:30.870
goes up again.

05:31.230 --> 05:38.170
And notice that in our case, we have actually lost some messages because they were stored without any

05:38.240 --> 05:39.960
replication in our case.

05:39.960 --> 05:44.340
And this example, replication of fact or for this particular topic is one.

05:44.520 --> 05:48.210
And that means that messages are not obligated to other brokers.

05:48.510 --> 05:49.090
Wonderful.

05:49.290 --> 05:50.500
That's all for this example.

05:50.520 --> 05:53.290
And next, let's quickly summarize what we did here.

05:53.460 --> 05:54.120
See you next.

05:54.130 --> 05:54.590
Bye bye.
