Open aricart opened 10 months ago
@Jarema I know that 2.10.x will have the ability to identify whether the intent of the operation is create/update, can you please put a pointer to the PR so we can ADR it
For java/.net
Here is the PR: https://github.com/nats-io/nats-server/pull/4217
Before 2.10, you would need to do the same as old Go client did: First call info, them create / update or not. After 2.10, you can skip this check, saving a lot of resources on the server side (and have less race'y behaviour)
Here is the PR: nats-io/nats-server#4217
Before 2.10, you would need to do the same as old Go client did: First call info, them create / update or not. After 2.10, you can skip this check, saving a lot of resources on the server side (and have less race'y behaviour)
Is there an work issue created for this functionality?
Overview
This is actually just a list of issues reported on JetStream simplification on the Go client, most may be Go specific, but take a look if you are doing something similar that may require some fix.
[These were extracted from internal client-dev channel notified by @piotrpio ]
https://github.com/nats-io/nats.go/issues/1305 - this is an issue with creating ordered consumer - what I did at first is I only created the actual consumer on the server once any method to receive messages was invoked (Consume, Fetch etc). This caused consumer.Info() to return error if called right after after stream.OrderedConsumer() . I am changing this to create consumer as soon as OrderedConsumer() is invoked
User complained about being able to easily get stream name by subject, without having to call ListStreams - I added a StreamNameBySubject method on JetStreamContext
Carefully consider the right naming for your methods to create/update the consumer, as in the next server release ( @Tomasz please confirm) there will be option to specify operation field when creating consumer (create/update ) to include proper server side validation (e.g. for create return error if you were to update existing consumer. This is the reason my method is now called CreateOrUpdateConsumer
There seemed to be confusion around why consume.Stop is not removing the consumer (as when unsubscribing in old API), so that may have to be well documented: https://github.com/nats-io/nats.go/issues/1304
https://github.com/nats-io/nats.go/pull/1322/files - this is a PR which makes js simplification use custom inbox prefix configured on nats.Conn - I missed that completely
https://github.com/nats-io/nats.go/issues/1323 - this is about missing HeadersOnly field on OrderedConsumerConfig - @Alberto I think you may be missing this one as well #1323 new jetstream interface does not allow an OrderedConsumer to be HeadersOnly. Why?
Clients and Tools
Other Tasks
Implemented
Client authors please update with your progress. If you open issues in your own repositories as a result of this request, please link them to this one by pasting the issue URL in a comment or main issue description.