From the course: Spring Boot 3 Essential Training

Unlock this course with a free trial

Join today to access over 24,300 courses taught by industry experts.

Building Spring message producers

Building Spring message producers - Spring Boot Tutorial

From the course: Spring Boot 3 Essential Training

Building Spring message producers

- [Instructor] Now let's create the Producer to get this system working from both ends. What you will find is, this is actually a little bit easier on the Producer side because we don't have to respond to messages in a reactive fashion. So the first thing I want to do is open up our Room CLR Application. We're going to go to our POM file and we're going to add a new dependency. And the dependency that we are going to add, as you may guess, is spring-boot-starter AMQP. We will let Maven bring in our dependencies. We'll go to Source, Main, Java, and in the root folder we will simply add a new Java class. We are going to call this, "AsyncPayload" and this should look very familiar because it's the exact same. So private UUID called id private String model. We'll annotate this with that data. Now we're going to go to our application class itself and the rest of our work is going to be done here. So after our main method, I am going to create a private static final String called…

Contents