Class RabbitmqConfig

java.lang.Object
com.bank.payment.configs.RabbitmqConfig

@Configuration public class RabbitmqConfig extends Object
Configuration class for RabbitMQ setup in the payment microservice.

This class defines the RabbitMQ connection factory, message converter, exchanges, and queues used in the payment microservice. It uses Jackson for JSON message conversion and sets up fanout exchanges for different event types.

Since:
1.0.0
Version:
1.0.0, 06/26/2025
Author:
Fernando Cruz Cavina
  • Field Details

    • requestNewCodeQueue

      @Value("${broker.queue.requestNewCode}") public String requestNewCodeQueue
    • sendPaymentQueue

      @Value("${broker.queue.sendPayment}") public String sendPaymentQueue
  • Constructor Details

    • RabbitmqConfig

      public RabbitmqConfig()
  • Method Details

    • rabbitTemplate

      @Bean public org.springframework.amqp.rabbit.core.RabbitTemplate rabbitTemplate()
    • messageConverter

      @Bean public org.springframework.amqp.support.converter.Jackson2JsonMessageConverter messageConverter()
    • fanoutExchangeAccount

      @Bean public org.springframework.amqp.core.FanoutExchange fanoutExchangeAccount()
    • fanoutExchangePayment

      @Bean public org.springframework.amqp.core.FanoutExchange fanoutExchangePayment()
    • fanoutExchangePaymentReceive

      @Bean public org.springframework.amqp.core.FanoutExchange fanoutExchangePaymentReceive()
    • fanoutExchangePaymentSender

      @Bean public org.springframework.amqp.core.FanoutExchange fanoutExchangePaymentSender()
    • requestNewCodeQueue

      @Bean public org.springframework.amqp.core.Queue requestNewCodeQueue()
    • sendPaymentQueue

      @Bean public org.springframework.amqp.core.Queue sendPaymentQueue()