Class RabbitmqConfig
java.lang.Object
dev.fernando.user_authentication_api.config.RabbitmqConfig
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 Summary
FieldsModifier and TypeFieldDescriptionQueue name for account creation.Queue name for user credentials creation.Queue name for email sending.Exchange name for user events. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.amqp.core.Queue
Bean definition for the account creation queue.org.springframework.amqp.core.FanoutExchange
Bean definition for the fanout exchange for user events.org.springframework.amqp.support.converter.Jackson2JsonMessageConverter
Bean definition for the user credentials creation queue.org.springframework.amqp.core.Queue
queue()
Bean definition for the email queue.
-
Field Details
-
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
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
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
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
-