diff --git a/utils.go b/utils.go index 16e75b5..5218be5 100644 --- a/utils.go +++ b/utils.go @@ -29,8 +29,14 @@ func combineStreamAndSubjectName(stream, subject string) string { return fmt.Sprintf("%s.%s", stream, subject) } -// GenerateSubject ... -// GenerateSubject("admin", "help_center", "get_ticket_by_id") -func GenerateSubject(server, service, subject string) string { - return fmt.Sprintf("%s.%s.%s.%s", globalConfig.StreamName, server, service, subject) +// GenerateJetStreamSubject ... +// GenerateJetStreamSubject("admin", "help_center", "get_ticket_by_id") +func GenerateJetStreamSubject(server, service, subject string) string { + 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) }