We have just heard that the new producer in Java and we have specified three mandatory parameters of
bootstrap rescue, serializer and values serializer, and that those properties supposed that will sound
as string's balls, keys and values.
So that's why here in the new produce the record, we have specified that we want to convert integers
to strings and we will simply send 100 messages to topic numbers.
And the doors just will actually start from number zero.
And last one will be was number nine tonight.
Great.
Let's not actually create a new topic now because before we haven't yet created it and afterwards we
will start the basic console consumer in order to see whether messages will arrive to this topic or
not.
And that's usually let's create a new topic in the terminal.
And for that, let's go to list of commands.
Find a command that will create a new topic is and let's replace topic name with numbers and let's create
actually a few partitions with an application of fact or three like this.
Let me quote the entire command.
Go to Tamino.
Open up New Tab City to COFCO and let's create new topic numbers.
Topic seems to be created and now let's find at least all topics like this.
And yes, topic number is now here.
Great, let's not start the consumer and we will start calling so consumer and we will connect to topic
numbers like this.
And let's now read from all parties.
Let me select this comment.
Go here and let's start the consumer here in this step.
Let's clear it and let's start consumer.
Consumer is not running.
And now we are able to get back to our producer and try to start it.
You could start it by clicking on this Green Arrow here in the front of the name of the method.
Or you could use this arrow here.
But I still see the name of the first class that we have used at the beginning of this example.
And I could simply remove it.
Let me do that, remove and apply.
It was removed.
And now let's start our main method like this round producer domain.
And now here at the top, you are able to build producer Astarte and debug if you want.
Also below you'll see that the new terminal window was opened and actually our application was executed.
Let's first go to consumer and verify whether it has received some messages or not.
And yes, here we see a bunch of messages and that means that our producer has successfully done his
job.
Now let's go back to this terminal and observe what was happened here and actually here.
We don't see much.
We see that producer has started afterwards.
We see some warnings and the finally process finished with exit code zero.
And that means that producer was executed successfully.
But it seems that we need to add the one more dependency door project to get rid of those warnings and
see Lokes related to producer.
And let's quickly do that.
Let's go to bomb example and go here to dependent's section here and press.
Come on and and add here dependancy and type here itself for Jay.
And here in the dropdown please select a select for JS simple this one and let's select the last stable
of our option.
In my case this is one seven thirty and let's click at Great.
This dependency was important and now let's try to run our producer.
But before that, let's add some meaningful logs to terminal in order to be able to see that the producer
actually produces messages.
And let's add this here.
And we could type S or you D and the press enter and HealthSpring to the console message here.
We'll do.
Plus I, I will be across the screen and here will be was just produced.
Like this and let's start our producer over again, but first, let's go to consumer and let's add here
some space in order to be able to see that it will receive again, one hundred messages.
Let's go back to producer and run it again.
Click on this Green Arrow.
And now in the terminal, we see much more information and actually we see nice looking Glock's related
to start of the producer and also we see that every message was produced successfully.
And there are 100 such kind of messages.
Also, if you will go to consumer, you should see additional 100 messages that we just received from
producer.
So here was last batch and here was a previous batch also of 100 messages.
And in total at the moment there are 200 messages because we have executed producer two times.
Great.
Let's now proceed.
And next, let me quickly explain to you what those logs in the terminal mean.
See you next.
Bye bye.