WEBVTT 00:04.460 --> 00:10.790 Now let's discuss how consumers may consume messages from a specific topic, usually every consumer 00:10.910 --> 00:17.210 is connected just to one topic, but it is possible to connect to multiple topics as well and to consumer 00:17.210 --> 00:24.350 messages from multiple topics on this diagram, U.S. consumer that is connected to topic A and IT consumer 00:24.350 --> 00:25.670 messages from that topic. 00:26.330 --> 00:32.360 And you are able to consume messages either from all politicians or just one politician if you want, 00:32.510 --> 00:38.810 or from several politicians and you are able either to consume messages from beginning. 00:39.290 --> 00:44.560 In such case, you can tell Coffeecake lost or that you want to consume messages from beginning. 00:44.780 --> 00:50.810 And in such case, messages starting from offset number zero will be consumed by that consumer. 00:51.230 --> 00:56.360 But of course, if some messages were already deleted to do it, the retention period, for example, 00:56.360 --> 01:03.680 messages zero and the one where are deleted by Broecker, then in such case of this consumer will start 01:03.680 --> 01:06.550 consumption only from a set number two. 01:07.340 --> 01:14.270 Also, you are able to start the consumer from the current state, and that means that the consumer 01:14.270 --> 01:19.580 will receive only new messages that will arrive to specific partitions. 01:19.910 --> 01:25.730 In such case, it will just wait for your messages and receive them as soon as they will be produced 01:25.730 --> 01:26.930 by producers. 01:27.710 --> 01:34.840 Although it is possible to create multiple consumers that will consume messages from the single topic. 01:35.120 --> 01:39.860 And in such case, those multiple consumers will belong to consumer group. 01:40.400 --> 01:46.460 And in such case, every single message may be consumed only by one of the consumers in the consumer 01:46.460 --> 01:46.760 group. 01:47.270 --> 01:53.450 Also, when consumer connects to Kafka Gloster, you are able to specify a specific offset number you 01:53.450 --> 01:55.670 want to start reading messages from. 01:55.880 --> 02:01.880 For example, you could say that you want to read messages from offset number two and in such case, 02:01.880 --> 02:05.870 you will consume this message, this message, this one, and that's all. 02:06.140 --> 02:09.200 And after that, you will wait for new messages. 02:10.190 --> 02:16.460 Also, this is important to understand that the messages inside of the brokers will be a reminder, 02:16.460 --> 02:20.740 independent of the status of the message by specific consumer. 02:20.900 --> 02:21.510 What I mean. 02:21.710 --> 02:28.700 For example, let's say that all those messages were already consumed by this consumer, but it doesn't 02:28.700 --> 02:30.260 impact other consumers. 02:30.380 --> 02:36.100 If someone else will want to read the same messages, then Kafka broker will allow to do that. 02:36.140 --> 02:42.190 No problems at all because Kafka is published subscriber system and any quantity of subscribers are 02:42.200 --> 02:45.050 able to read messages stored in Kafka Breuker. 02:45.140 --> 02:46.310 That's that simple. 02:46.940 --> 02:50.390 Okay, that's all about the reading matter just by consumers. 02:50.540 --> 02:55.190 And of course, you are able to have multiple consumers that will read data in Parral. 02:55.190 --> 02:56.060 No problem at all. 02:56.900 --> 02:58.790 OK, that's all also for this section. 02:58.910 --> 03:07.520 And here in this section, I tried to make just short and quick overview of main concepts of Kafka infrastructure. 03:07.610 --> 03:11.240 And now I hope that you understand all of them and we are able to move on. 03:11.420 --> 03:16.490 And in the next section, we will get back to practice activities and launch coffeecake stories. 03:16.490 --> 03:17.510 Multiple brockers. 03:17.780 --> 03:23.930 I'll demonstrate you how leader is elected, how different partitions are assigned to different brokers 03:23.930 --> 03:24.620 and so on. 03:24.770 --> 03:29.480 So in the next section we will try multiple things that we have discussed here in this section and we 03:29.480 --> 03:30.710 will do that on practice. 03:30.950 --> 03:33.010 So see you in the next section and by my.