Configuring some RabbitMQ stuff

We want to configure some RabbitMQ exchanges, queues, and bindings. It can be done using the RabbitMQ client library. We will configure our required infrastructure for the Mail microservice.

Our configuration class should look like this:

package springfive.airline.mailservice.infra.rabbitmq;// imports are omitted@Configurationpublic class RabbitMQConfiguration {  private final String pass;  private final String user;  private final String host;  private final Integer port;  private final String mailQueue;  public RabbitMQConfiguration(@Value("${spring.rabbitmq.password}") String pass,      @Value("${spring.rabbitmq.username}") String user,      @Value("${spring.rabbitmq.host}") String host,      @Value("${spring.rabbitmq.port}" ...

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.