diff --git a/han-note-user-relation/han-note-user-relation-biz/pom.xml b/han-note-user-relation/han-note-user-relation-biz/pom.xml
index 79e25a7..698d9f5 100644
--- a/han-note-user-relation/han-note-user-relation-biz/pom.xml
+++ b/han-note-user-relation/han-note-user-relation-biz/pom.xml
@@ -96,6 +96,11 @@
han-note-user-api
+
+
+ org.apache.rocketmq
+ rocketmq-spring-boot-starter
+
diff --git a/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/config/RocketMQConfig.java b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/config/RocketMQConfig.java
new file mode 100644
index 0000000..743de32
--- /dev/null
+++ b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/config/RocketMQConfig.java
@@ -0,0 +1,10 @@
+package com.hanserwei.hannote.user.relation.biz.config;
+
+import org.apache.rocketmq.spring.autoconfigure.RocketMQAutoConfiguration;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Configuration
+@Import(RocketMQAutoConfiguration.class)
+public class RocketMQConfig {
+}
\ No newline at end of file
diff --git a/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/constant/MQConstants.java b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/constant/MQConstants.java
new file mode 100644
index 0000000..3f3423d
--- /dev/null
+++ b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/constant/MQConstants.java
@@ -0,0 +1,19 @@
+package com.hanserwei.hannote.user.relation.biz.constant;
+
+public interface MQConstants {
+
+ /**
+ * Topic: 关注、取关共用一个
+ */
+ String TOPIC_FOLLOW_OR_UNFOLLOW = "FollowUnfollowTopic";
+
+ /**
+ * 关注标签
+ */
+ String TAG_FOLLOW = "Follow";
+
+ /**
+ * 取关标签
+ */
+ String TAG_UNFOLLOW = "Unfollow";
+}
\ No newline at end of file
diff --git a/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/model/dto/FollowUserMqDTO.java b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/model/dto/FollowUserMqDTO.java
new file mode 100644
index 0000000..bd519f9
--- /dev/null
+++ b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/model/dto/FollowUserMqDTO.java
@@ -0,0 +1,21 @@
+package com.hanserwei.hannote.user.relation.biz.model.dto;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class FollowUserMqDTO {
+
+ private Long userId;
+
+ private Long followUserId;
+
+ private LocalDateTime createTime;
+}
\ No newline at end of file
diff --git a/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/service/impl/RelationServiceImpl.java b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/service/impl/RelationServiceImpl.java
index 30f2c34..87fd3d8 100644
--- a/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/service/impl/RelationServiceImpl.java
+++ b/han-note-user-relation/han-note-user-relation-biz/src/main/java/com/hanserwei/hannote/user/relation/biz/service/impl/RelationServiceImpl.java
@@ -6,11 +6,14 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.hanserwei.framework.biz.context.holder.LoginUserContextHolder;
import com.hanserwei.framework.common.exception.ApiException;
import com.hanserwei.framework.common.response.Response;
+import com.hanserwei.framework.common.utils.JsonUtils;
import com.hanserwei.hannote.user.dto.resp.FindUserByIdRspDTO;
+import com.hanserwei.hannote.user.relation.biz.constant.MQConstants;
import com.hanserwei.hannote.user.relation.biz.constant.RedisKeyConstants;
import com.hanserwei.hannote.user.relation.biz.domain.dataobject.FollowingDO;
import com.hanserwei.hannote.user.relation.biz.enums.LuaResultEnum;
import com.hanserwei.hannote.user.relation.biz.enums.ResponseCodeEnum;
+import com.hanserwei.hannote.user.relation.biz.model.dto.FollowUserMqDTO;
import com.hanserwei.hannote.user.relation.biz.model.vo.FollowUserReqVO;
import com.hanserwei.hannote.user.relation.biz.rpc.UserRpcService;
import com.hanserwei.hannote.user.relation.biz.service.FollowingDOService;
@@ -18,9 +21,14 @@ import com.hanserwei.hannote.user.relation.biz.service.RelationService;
import com.hanserwei.hannote.user.relation.biz.util.DateUtils;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
+import org.apache.rocketmq.client.producer.SendCallback;
+import org.apache.rocketmq.client.producer.SendResult;
+import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.core.io.ClassPathResource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.script.DefaultRedisScript;
+import org.springframework.messaging.Message;
+import org.springframework.messaging.support.MessageBuilder;
import org.springframework.scripting.support.ResourceScriptSource;
import org.springframework.stereotype.Service;
@@ -39,6 +47,8 @@ public class RelationServiceImpl implements RelationService {
private RedisTemplate