Skip to content

error: no stream matches subject #1178

Answered by Jarema
ondbyte asked this question in Q&A
Discussion options

You must be logged in to vote

It's because your stream accepts literal SOMESTREAM subject, not SOMESTREAM.something.

To have it working do:

info,err:=js.AddStream(&nats.StreamConfig{Name: "SOMESTREAM", subjects: []string{"SOMESTREAM.*"})

you can also use SOMESTREAM.> which will match every token after SOMESTREAM, i.e. SOMESTREAM.data.other.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ondbyte
Comment options

Answer selected by Jarema
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants