WEBVTT 00:04.300 --> 00:09.550 From the previous lecture, you know that every message that is taught at Kafka broker is immutable, 00:09.640 --> 00:14.410 and that means that you are not able to change the contents of the message that was already stored at 00:14.410 --> 00:15.300 Kafka Brocco. 00:15.700 --> 00:19.330 Also, on the other hand, every message has its own structure. 00:19.480 --> 00:20.940 So let me explain it now. 00:21.220 --> 00:28.480 Every message has time stamp, and this time stamp can be assigned to the message either by Kafka broker 00:28.660 --> 00:30.110 or by producer. 00:30.310 --> 00:31.540 So it is configurable. 00:31.900 --> 00:37.140 Also, every message has of set number and kept that in the previous lecture. 00:37.270 --> 00:37.690 I did. 00:37.690 --> 00:44.110 Didn't told you that this number must be unique across Storbeck death because it must be unique only 00:44.110 --> 00:45.310 across Patison. 00:45.670 --> 00:48.520 We will get back to practicals pretty soon in one of the next letters. 00:48.640 --> 00:55.260 But for now, just to recap, that of set number is unique only across partition in a specific topic. 00:55.600 --> 01:01.720 So that's the way our time stamp and offset that are assigned to the message and message itself may 01:01.720 --> 01:04.890 contain key that is optional and value. 01:05.170 --> 01:09.660 Well, of every message is simply a sequence of bytes, nothing else. 01:09.880 --> 01:14.590 And the broker does not care what is actually stored inside of the message. 01:14.740 --> 01:17.260 It stores simply a sequence of bytes. 01:17.440 --> 01:23.050 That means that using Aperture Kafka as centralized transportation messaging system, you are able to 01:23.050 --> 01:25.140 exchange different kinds of data. 01:25.330 --> 01:30.910 For example, you could send objects or you could send strings or numbers or more than that you are 01:30.910 --> 01:35.830 able to send files that must be encoded simply into bytes format. 01:35.860 --> 01:39.640 That's all Kafka stories, just sequences of bytes. 01:40.000 --> 01:47.110 But also, please keep in mind that the idea of Kalika messaging system is to keep messages as small 01:47.110 --> 01:48.010 as possible. 01:48.160 --> 01:52.270 So please don't try to send entire movies in a single message. 01:52.270 --> 01:54.660 That's not the purpose of Kafka. 01:54.760 --> 02:00.340 Its purpose is to quickly send just small messages between producers and consumers. 02:00.460 --> 02:01.030 That's it. 02:01.390 --> 02:03.420 And that is actually optional. 02:03.430 --> 02:08.190 You are able to use as additional grouping mechanism for messages inside of the topic. 02:08.440 --> 02:14.920 For example, if there are multiple stories that the sent messages to centralized Abushagur service, 02:15.040 --> 02:23.230 for example, about sales of every product and using, you are able to set name of each store that sends 02:23.230 --> 02:25.240 data to a Kafka topic. 02:25.390 --> 02:31.900 And using this, you are able to distinguish which shop has sent this or that message also. 02:31.900 --> 02:38.860 And also notice about is they are created on producers and the Santa Gabriel girls and the if several 02:38.860 --> 02:43.740 messages have the same gear, they will be sent to the same position. 02:43.890 --> 02:45.100 We will get back to that later on. 02:45.100 --> 02:51.130 But for now, just keep in mind that using you are able to direct messages to specific partition. 02:51.670 --> 02:53.650 So that's all about message structure. 02:53.650 --> 02:59.350 And to summarize, every message has a unique offset number that is unique across partition. 02:59.560 --> 03:05.680 Second, every message has timestamp and every message has basically message your body. 03:05.860 --> 03:08.440 It is a value and optional Akiem. 03:08.680 --> 03:10.870 So that's all about message structure. 03:11.020 --> 03:17.170 And also, please keep in mind that you should keep every message as small as possible to achieve maximum 03:17.260 --> 03:19.220 efficiency of a bicycle. 03:19.390 --> 03:21.670 Kloster So that's all for this year. 03:21.670 --> 03:28.710 And next, let me explain you how topics are spread among different brokers and what is actually partition 03:28.720 --> 03:31.540 and how partitions are spread among different brokers. 03:31.750 --> 03:32.590 So see you next. 03:32.830 --> 03:33.010 Bye.