Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
The server consumer creation code is picky and does indeed not accept a request send to the ExT subject if that request specifies the subject filter in the array (even if there is only one entry in the array).
  • Loading branch information
jnmoyne committed Sep 20, 2023
1 parent e98dfc8 commit bc2402f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -2895,7 +2895,9 @@ func (mset *stream) setSourceConsumer(iname string, seq uint64, startTime time.T
subject = fmt.Sprintf(JSApiConsumerCreateExT, si.name, req.Config.Name, req.Config.FilterSubject)
} else if len(req.Config.FilterSubjects) == 1 {
req.Config.Name = fmt.Sprintf("src-%s", createConsumerName())
subject = fmt.Sprintf(JSApiConsumerCreateExT, si.name, req.Config.Name, req.Config.FilterSubjects[0])
req.Config.FilterSubject = req.Config.FilterSubjects[0]
req.Config.FilterSubjects = []string{}

This comment has been minimized.

Copy link
@derekcollison

derekcollison Sep 20, 2023

Member

Just make nil?

This comment has been minimized.

Copy link
@jnmoyne

jnmoyne Sep 20, 2023

Author Contributor

Sure, I forgot its probably more idiomatic in Go to do that even though the field is not declared as a pointer, will make the change.

subject = fmt.Sprintf(JSApiConsumerCreateExT, si.name, req.Config.Name, req.Config.FilterSubject)
} else {
subject = fmt.Sprintf(JSApiConsumerCreateT, si.name)
}
Expand Down

0 comments on commit bc2402f

Please sign in to comment.