You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The C client does the right thing there, by always using the default JS context or the option provided by individual calls. It looks like the Go client is using js.apiSubj() that only uses whatever is defined in the context, not in individual calls options.
It is actually a bit problematic right now, as you can pass any JSOpt to any of the methods of JetStreamManager, even if it does not make much sense (like e.g. configuring StreamPurgeRequest). I am working on a solution which would restrict using some options only to particular methods, but some of those options (like Domain() or APIPrefix()) seem to be good candidates to use in many methods, not just when creating JetStreamContext (like the C client does).
Defect
Signature of ConsumerInfo and AddConsumer allow pass JSOpt but ignore most of them only context or timeout is used.
nats.go/jsm.go
Line 439 in 543e628
nats.go/jsm.go
Line 446 in 543e628
Rest of options like domain is ignored.
Versions of
nats.go
and thenats-server
if one was involved:nats.go 1.16 and 1.17
OS/Container environment:
N/A
Steps or code to reproduce the issue:
create jetstream my_stream_on_domain on domain my_domain
and consumer "any_consumer_name"
call:
Expected result:
got consumer info and err is nil
Actual result:
got error nats.ErrStreamNotFound
The text was updated successfully, but these errors were encountered: