-
Hi, //able to connect to the server
//then
//I add a stream
info,err:=js.AddStream(&nats.StreamConfig{Name: "SOMESTREAM"})
//err is nil
//When i do
_,err=js.Subscribe("SOMESTREAM.something",func(msg *nats.Msg) {
...
})
//here I'm receiving error "no stream matches subject"
//even
name, err := js.StreamNameBySubject("SOMESTREAM.something")
//gives the same error why I'm getting this error "no stream matches subject" using: |
Beta Was this translation helpful? Give feedback.
Answered by
Jarema
Jan 3, 2023
Replies: 1 comment 1 reply
-
It's because your stream accepts literal To have it working do:
you can also use |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
Jarema
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's because your stream accepts literal
SOMESTREAM
subject, notSOMESTREAM.something
.To have it working do:
you can also use
SOMESTREAM.>
which will match every token afterSOMESTREAM
, i.e.SOMESTREAM.data.other
.