Class InternalMailJetEventsQueueConfig
java.lang.Object
es.kukenan.smartfi.microservice.communication.config.InternalMailJetEventsQueueConfig
Create the configuration needed to create the internal queue for MailJet real-time notification events.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classAmqp message converter for the "MailJet real time API notification events".private static classSimple error handler that only logs the errors thrown. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate StringInternal queue to publish to and consume from MailJet events. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.amqp.rabbit.core.RabbitTemplateinternalMailJetEventsAmqpTemplate(org.springframework.amqp.rabbit.connection.ConnectionFactory connectionFactory, es.kukenan.smartfi.common.utils.CustomObjectMapper customObjectMapper) Rabbit template to use to send MailJet events to the load-balancing queue.org.springframework.amqp.core.QueueInternal queue for MailJet real-time notification events.private org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapternotificationsInQueueListenerAdapter(es.kukenan.smartfi.common.utils.CustomObjectMapper customObjectMapper, InternalMailJetEventsQueueController internalMailJetEventsQueueController) MailJet events controller message listener adapter.
-
Field Details
-
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.
-