Class InternalMailJetEventsQueueConfig

java.lang.Object
es.kukenan.smartfi.microservice.communication.config.InternalMailJetEventsQueueConfig

@Configuration @RefreshScope public class InternalMailJetEventsQueueConfig extends Object
Create the configuration needed to create the internal queue for MailJet real-time notification events.
  • Field Details

    • internalMailJetEventsQueueName

      @Value("${mailjet.internal.queue.name}") private String internalMailJetEventsQueueName
      Internal queue to publish to and consume from MailJet events.
  • Constructor Details

    • InternalMailJetEventsQueueConfig

      public InternalMailJetEventsQueueConfig()
  • Method Details

    • internalMailJetEventsQueue

      @Bean("internalMailJetEventsQueue") public org.springframework.amqp.core.Queue internalMailJetEventsQueue()
      Internal queue for MailJet real-time notification events.
      Returns:
      Responses queue bean.
    • notificationsInQueueListenerAdapter

      private org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter notificationsInQueueListenerAdapter(es.kukenan.smartfi.common.utils.CustomObjectMapper customObjectMapper, InternalMailJetEventsQueueController internalMailJetEventsQueueController)
      MailJet events controller message listener adapter.
      Parameters:
      customObjectMapper - objectMapper for JSON transformations.
      internalMailJetEventsQueueController - controller that will be configured as interface for IN/OUT operations with the events queue.
      Returns:
      MessageListenerAdapter.
    • internalMailJetEventsAmqpTemplate

      @Bean(name="internalMailJetEventsAmqpTemplate") public org.springframework.amqp.rabbit.core.RabbitTemplate internalMailJetEventsAmqpTemplate(@Autowired org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, @Autowired es.kukenan.smartfi.common.utils.CustomObjectMapper customObjectMapper)
      Rabbit template to use to send MailJet events to the load-balancing queue.
      Parameters:
      connectionFactory - rabbitmq connection factory.
      customObjectMapper - objectMapper for JSON transformations.
      Returns:
      the rabbit template to use to send MailJet events to the load-balancing queue.