WEBVTT 00:04.200 --> 00:09.970 We have just heard that the new producer in Java and we have specified three mandatory parameters of 00:09.980 --> 00:17.460 bootstrap rescue, serializer and values serializer, and that those properties supposed that will sound 00:17.730 --> 00:20.390 as string's balls, keys and values. 00:20.390 --> 00:26.360 So that's why here in the new produce the record, we have specified that we want to convert integers 00:26.520 --> 00:31.710 to strings and we will simply send 100 messages to topic numbers. 00:31.890 --> 00:35.580 And the doors just will actually start from number zero. 00:35.580 --> 00:38.140 And last one will be was number nine tonight. 00:38.430 --> 00:38.820 Great. 00:39.120 --> 00:45.180 Let's not actually create a new topic now because before we haven't yet created it and afterwards we 00:45.180 --> 00:51.420 will start the basic console consumer in order to see whether messages will arrive to this topic or 00:51.420 --> 00:51.720 not. 00:52.020 --> 00:54.630 And that's usually let's create a new topic in the terminal. 00:54.720 --> 00:57.390 And for that, let's go to list of commands. 00:57.600 --> 01:05.340 Find a command that will create a new topic is and let's replace topic name with numbers and let's create 01:05.340 --> 01:09.470 actually a few partitions with an application of fact or three like this. 01:09.810 --> 01:11.610 Let me quote the entire command. 01:11.940 --> 01:13.020 Go to Tamino. 01:14.060 --> 01:19.340 Open up New Tab City to COFCO and let's create new topic numbers. 01:21.000 --> 01:25.680 Topic seems to be created and now let's find at least all topics like this. 01:26.630 --> 01:28.650 And yes, topic number is now here. 01:29.050 --> 01:35.420 Great, let's not start the consumer and we will start calling so consumer and we will connect to topic 01:35.420 --> 01:37.130 numbers like this. 01:37.280 --> 01:39.200 And let's now read from all parties. 01:39.770 --> 01:41.180 Let me select this comment. 01:41.180 --> 01:44.810 Go here and let's start the consumer here in this step. 01:45.170 --> 01:48.080 Let's clear it and let's start consumer. 01:48.680 --> 01:49.910 Consumer is not running. 01:49.910 --> 01:54.260 And now we are able to get back to our producer and try to start it. 01:54.530 --> 01:59.600 You could start it by clicking on this Green Arrow here in the front of the name of the method. 01:59.840 --> 02:01.940 Or you could use this arrow here. 02:02.330 --> 02:06.950 But I still see the name of the first class that we have used at the beginning of this example. 02:07.160 --> 02:09.080 And I could simply remove it. 02:09.080 --> 02:10.880 Let me do that, remove and apply. 02:10.880 --> 02:11.690 It was removed. 02:11.810 --> 02:16.250 And now let's start our main method like this round producer domain. 02:17.150 --> 02:21.620 And now here at the top, you are able to build producer Astarte and debug if you want. 02:22.040 --> 02:28.580 Also below you'll see that the new terminal window was opened and actually our application was executed. 02:28.700 --> 02:33.590 Let's first go to consumer and verify whether it has received some messages or not. 02:33.800 --> 02:39.860 And yes, here we see a bunch of messages and that means that our producer has successfully done his 02:39.860 --> 02:40.210 job. 02:40.670 --> 02:46.160 Now let's go back to this terminal and observe what was happened here and actually here. 02:46.160 --> 02:47.150 We don't see much. 02:47.360 --> 02:49.910 We see that producer has started afterwards. 02:49.910 --> 02:54.140 We see some warnings and the finally process finished with exit code zero. 02:54.350 --> 02:58.010 And that means that producer was executed successfully. 02:58.310 --> 03:04.220 But it seems that we need to add the one more dependency door project to get rid of those warnings and 03:04.220 --> 03:06.230 see Lokes related to producer. 03:06.380 --> 03:07.640 And let's quickly do that. 03:07.640 --> 03:14.390 Let's go to bomb example and go here to dependent's section here and press. 03:14.390 --> 03:19.970 Come on and and add here dependancy and type here itself for Jay. 03:20.180 --> 03:26.630 And here in the dropdown please select a select for JS simple this one and let's select the last stable 03:26.630 --> 03:27.050 of our option. 03:27.050 --> 03:32.090 In my case this is one seven thirty and let's click at Great. 03:32.330 --> 03:37.940 This dependency was important and now let's try to run our producer. 03:38.270 --> 03:44.270 But before that, let's add some meaningful logs to terminal in order to be able to see that the producer 03:44.270 --> 03:45.740 actually produces messages. 03:46.040 --> 03:47.870 And let's add this here. 03:47.990 --> 03:55.250 And we could type S or you D and the press enter and HealthSpring to the console message here. 03:55.250 --> 03:55.620 We'll do. 03:55.640 --> 04:01.910 Plus I, I will be across the screen and here will be was just produced. 04:03.050 --> 04:09.700 Like this and let's start our producer over again, but first, let's go to consumer and let's add here 04:09.710 --> 04:14.560 some space in order to be able to see that it will receive again, one hundred messages. 04:14.870 --> 04:17.090 Let's go back to producer and run it again. 04:17.190 --> 04:18.500 Click on this Green Arrow. 04:21.130 --> 04:27.460 And now in the terminal, we see much more information and actually we see nice looking Glock's related 04:27.460 --> 04:33.550 to start of the producer and also we see that every message was produced successfully. 04:33.760 --> 04:36.880 And there are 100 such kind of messages. 04:37.280 --> 04:43.450 Also, if you will go to consumer, you should see additional 100 messages that we just received from 04:43.450 --> 04:44.180 producer. 04:44.530 --> 04:49.270 So here was last batch and here was a previous batch also of 100 messages. 04:49.570 --> 04:55.280 And in total at the moment there are 200 messages because we have executed producer two times. 04:55.720 --> 04:56.140 Great. 04:56.320 --> 04:57.160 Let's now proceed. 04:57.160 --> 05:02.640 And next, let me quickly explain to you what those logs in the terminal mean. 05:03.040 --> 05:03.700 See you next. 05:03.730 --> 05:04.200 Bye bye.