Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
XFFFCCCC committed Aug 30, 2023
1 parent 558abed commit 9b4e0d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/constant/strings/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ const (
VideoCommentEvent = "video.comment.action"
VideoPublishEvent = "video.publish.action"

MessageActionEvent = "message_send"
MessageActionEvent = "message.send"
)
5 changes: 4 additions & 1 deletion src/services/message/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,17 @@ func (c MessageServiceImpl) New() {
failOnError(err, "Failed to open a channel")
}

channel.ExchangeDeclare(
err = channel.ExchangeDeclare(
strings.MessageExchange,
"x-delayed-message",
true, false, false, false,
amqp.Table{
"x-delayed-type": "direct",
},
)
if err != nil {
failOnError(err, "Failed to get exchange")
}

_, err = channel.QueueDeclare(
strings.MessageActionEvent,
Expand Down

0 comments on commit 9b4e0d6

Please sign in to comment.