Declaring Spring beans for RabbitMQ

Now, let's create our configuration class. The class is pretty simple and as we will see with the Spring abstraction, they are easy to understand too, especially because the class names allude to the RabbitMQ entities.

Let's create our class:

package springfive.twittergathering.infra.rabbitmqimport com.fasterxml.jackson.databind.ObjectMapperimport com.fasterxml.jackson.module.kotlin.KotlinModuleimport org.springframework.amqp.core.Bindingimport org.springframework.amqp.core.BindingBuilderimport org.springframework.amqp.core.Queueimport org.springframework.amqp.core.TopicExchangeimport org.springframework.amqp.support.converter.Jackson2JsonMessageConverterimport org.springframework.beans.factory.annotation. ...

Get Spring 5.0 By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.