Creating exchanges, queues, and bindings for the Twitter Hashtag Service

Let's declare our RabbitMQ entities for the Tracked Hashtag usage. We will do that using the @Configuration class.

The RabbitMQ connection should look like this:

package springfive.twittertracked.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.Valueimport org.springframework.context.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.