feat:时间线MQ发送端和消费端

This commit is contained in:
Amnesia
2026-03-13 16:07:34 +08:00
parent 7be6e8bdb5
commit 0ef79f54cb
3 changed files with 98 additions and 1 deletions

View File

@@ -8,6 +8,7 @@ import (
rediscache "feedsystem_video_go/internal/middleware/redis"
"feedsystem_video_go/internal/social"
"feedsystem_video_go/internal/video"
"feedsystem_video_go/internal/worker"
"log"
"github.com/gin-gonic/gin"
@@ -127,5 +128,9 @@ func SetRouter(db *gorm.DB, cache *rediscache.Client, rmq *rabbitmq.RabbitMQ) *g
{
protectedFeedGroup.POST("/listByFollowing", feedHandler.ListByFollowing)
}
//worker
timelineMQ, err := rabbitmq.NewTimelineMQ(rmq)
worker.StartOutboxPoller(db, timelineMQ)
worker.StartConsumer(timelineMQ, "video.timeline.update.queue", cache)
return r
}