fix rule of stream and subject name
This commit is contained in:
parent
35714c8292
commit
95dead981a
8
queue.go
8
queue.go
|
@ -8,10 +8,12 @@ import (
|
|||
)
|
||||
|
||||
// QueueSubscribe ...
|
||||
func QueueSubscribe(subject, queueName string, cb nats.MsgHandler) error {
|
||||
_, err := natsJS.QueueSubscribe(subject, queueName, cb)
|
||||
func QueueSubscribe(stream, subject, queueName string, cb nats.MsgHandler) error {
|
||||
channel := combineStreamAndSubjectName(stream, subject)
|
||||
|
||||
_, err := natsJS.QueueSubscribe(channel, queueName, cb)
|
||||
if err != nil {
|
||||
msg := fmt.Sprintf("queue subscribe with subject %s error: %s", subject, err.Error())
|
||||
msg := fmt.Sprintf("queue subscribe with subject %s error: %s", channel, err.Error())
|
||||
return errors.New(msg)
|
||||
}
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue