Add pull subscribe #1

Merged
namhq1989 merged 12 commits from add-pull-subscribe into master 2022-03-18 04:28:50 +00:00
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 240cc725e8 - Show all commits

View File

@ -45,7 +45,7 @@ func (js JetStream) Subscribe(stream, subject string, cb nats.MsgHandler) (*nats
func (js JetStream) PullSubscribe(stream, subject string) (*nats.Subscription, error) { func (js JetStream) PullSubscribe(stream, subject string) (*nats.Subscription, error) {
channel := combineStreamAndSubjectName(stream, subject) channel := combineStreamAndSubjectName(stream, subject)
sub, err := js.instance.PullSubscribe(channel, subject) sub, err := js.instance.PullSubscribe(stream, subject)
if err != nil { if err != nil {
msg := fmt.Sprintf("[NATS JETSTREAM] - pull subscribe subject #%s error: %s", channel, err.Error()) msg := fmt.Sprintf("[NATS JETSTREAM] - pull subscribe subject #%s error: %s", channel, err.Error())
return nil, errors.New(msg) return nil, errors.New(msg)