separate generate subject name for nats type
This commit is contained in:
parent
8321743717
commit
e2b22676d4
14
utils.go
14
utils.go
|
@ -29,8 +29,14 @@ func combineStreamAndSubjectName(stream, subject string) string {
|
||||||
return fmt.Sprintf("%s.%s", stream, subject)
|
return fmt.Sprintf("%s.%s", stream, subject)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GenerateSubject ...
|
// GenerateJetStreamSubject ...
|
||||||
// GenerateSubject("admin", "help_center", "get_ticket_by_id")
|
// GenerateJetStreamSubject("admin", "help_center", "get_ticket_by_id")
|
||||||
func GenerateSubject(server, service, subject string) string {
|
func GenerateJetStreamSubject(server, service, subject string) string {
|
||||||
return fmt.Sprintf("%s.%s.%s.%s", globalConfig.StreamName, server, service, subject)
|
return fmt.Sprintf("%s.jetstream.%s.%s.%s", globalConfig.StreamName, server, service, subject)
|
||||||
|
}
|
||||||
|
|
||||||
|
// GenerateReqrepSubject ...
|
||||||
|
// GenerateReqrepSubject("admin", "help_center", "get_ticket_by_id")
|
||||||
|
func GenerateReqrepSubject(server, service, subject string) string {
|
||||||
|
return fmt.Sprintf("%s.reqrep.%s.%s.%s", globalConfig.StreamName, server, service, subject)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue