Class InternalMailJetEventsQueueController
java.lang.Object
es.kukenan.smartfi.microservice.communication.controller.InternalMailJetEventsQueueController
Internal MailJet events queue controller. This queue is used just to avoid flooding and for load-balancing.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.springframework.amqp.core.AmqpTemplateAMQP template used to send messages to the queue.private org.springframework.amqp.core.QueueThe events queue.private MailjetEventsServiceThe service where the logic to the events handling is located.static final StringEntrypoint for the "MailJet real-time events" message handling. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonEvent(AbstractEvent event) This event is invoked to handle an event from the event queue.voidpublish(AbstractEvent event) Send an event to the internal queue.
-
Field Details
-
RECEIVE_METHOD
Entrypoint for the "MailJet real-time events" message handling.- See Also:
-
eventsQueue
@Autowired @Qualifier("internalMailJetEventsQueue") private org.springframework.amqp.core.Queue eventsQueueThe events queue. -
amqpTemplate
@Autowired @Qualifier("internalMailJetEventsAmqpTemplate") private org.springframework.amqp.core.AmqpTemplate amqpTemplateAMQP template used to send messages to the queue. -
eventsService
The service where the logic to the events handling is located.
-
-
Constructor Details
-
InternalMailJetEventsQueueController
public InternalMailJetEventsQueueController()
-
-
Method Details
-
onEvent
This event is invoked to handle an event from the event queue. The logic is delegated to the service.- Parameters:
event- a new event to handle.
-
publish
Send an event to the internal queue.- Parameters:
event- the event to send to the queue.
-