From 0559e1f5239d1f5496155eacd447bdad75e19006 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Thu, 4 Oct 2018 23:02:06 +0300 Subject: Async event listeners --- .../main/java/com/juick/service/component/NotificationListener.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'juick-common/src/main/java/com/juick/service') diff --git a/juick-common/src/main/java/com/juick/service/component/NotificationListener.java b/juick-common/src/main/java/com/juick/service/component/NotificationListener.java index e4ccb13b..8092e258 100644 --- a/juick-common/src/main/java/com/juick/service/component/NotificationListener.java +++ b/juick-common/src/main/java/com/juick/service/component/NotificationListener.java @@ -1,16 +1,22 @@ package com.juick.service.component; import org.springframework.context.event.EventListener; +import org.springframework.scheduling.annotation.Async; public interface NotificationListener { + @Async @EventListener void processMessageEvent(MessageEvent messageEvent); + @Async @EventListener void processSubscribeEvent(SubscribeEvent subscribeEvent); + @Async @EventListener void processLikeEvent(LikeEvent likeEvent); + @Async @EventListener void processPingEvent(PingEvent pingEvent); + @Async @EventListener void processMessageReadEvent(MessageReadEvent messageReadEvent); } -- cgit v1.2.3