Class RabbitmqConfig

java.lang.Object
dev.fernando.user_authentication_api.config.RabbitmqConfig

@Configuration public class RabbitmqConfig extends Object
Configuration class for RabbitMQ settings. This class defines the queues, exchanges, and message converters used in the application. It is responsible for setting up the messaging infrastructure for user-related events.
Since:
1.0.0
Author:
Fernando Cruz Cavina
  • Field Details

    • emailQueue

      @Value("${broker.queue.email.sender}") public String emailQueue
      Queue name for email sending. This queue is used to handle email sending requests in the application. It is defined in the application properties file.
    • createAccount

      @Value("${broker.queue.create.account}") public String createAccount
      Queue name for account creation. This queue is used to handle account creation requests in the application. It is defined in the application properties file.
    • createCredentials

      @Value("${broker.queue.create.auth}") public String createCredentials
      Queue name for user credentials creation. This queue is used to handle user credentials creation requests in the application. It is defined in the application properties file.
    • exchangeUserEvent

      @Value("${broker.exchance.userExchange}") public String exchangeUserEvent
      Exchange name for user events. This exchange is used to broadcast user-related events to multiple queues. It is defined in the application properties file.
  • Constructor Details

    • RabbitmqConfig

      public RabbitmqConfig()
  • Method Details

    • queue

      @Bean public org.springframework.amqp.core.Queue queue()
      Bean definition for the email queue. This queue is used to handle email sending requests. It is created as a durable queue, meaning it will survive broker restarts.
      Returns:
      a new instance of Queue for email sending
    • credentialsQueue

      @Bean public org.springframework.amqp.core.Queue credentialsQueue()
      Bean definition for the account creation queue. This queue is used to handle account creation requests. It is created as a durable queue, meaning it will survive broker restarts.
      Returns:
      a new instance of Queue for account creation
    • objectMapper

      @Bean public org.springframework.amqp.support.converter.Jackson2JsonMessageConverter objectMapper()
      Bean definition for the user credentials creation queue. This queue is used to handle user credentials creation requests. It is created as a durable queue, meaning it will survive broker restarts.
      Returns:
      a new instance of Queue for user credentials creation
    • fanoutExchangeUser

      @Bean public org.springframework.amqp.core.FanoutExchange fanoutExchangeUser()
      Bean definition for the fanout exchange for user events. This exchange is used to broadcast user-related events to multiple queues. It is created as a durable exchange, meaning it will survive broker restarts.
      Returns:
      a new instance of FanoutExchange for user events