fox/service/topic.go
2025-05-25 20:02:15 +08:00

19 lines
303 B
Go

package service
import (
"fmt"
)
// 每个服务都有自己的服务topic
func Topic(s IService) string {
return fmt.Sprintf("%v-%v.topic", s.Type(), s.Name())
}
func GroupTopic(s IService) string {
return s.Type() + ".topic"
}
func GroupQueue(s IService) string {
return s.Type() + ".group"
}