This is the most interesting part now. When we want to save the TrackedHashTag, we must send the pretty new entity to the RabbitMQ. This process will send the message, and then the Twitter Gathering microservice will start to consume the stream in ten seconds.
We need to change the TrackedHashTagService a little bit; the final version should look like this:
package springfive.twittertracked.domain.serviceimport org.springframework.amqp.rabbit.core.RabbitTemplateimport org.springframework.beans.factory.annotation.Valueimport org.springframework.stereotype.Serviceimport reactor.core.publisher.Monoimport springfive.twittertracked.domain.TrackedHashTagimport springfive.twittertracked.domain.repository.TrackedHashTagRepository ...