Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JetStream: lot of changes #794

Merged
merged 4 commits into from Aug 17, 2021
Merged

JetStream: lot of changes #794

merged 4 commits into from Aug 17, 2021

Commits on Aug 15, 2021

  1. JetStream: lot of changes

    They will be described in the release notes, but gist:
    
    Added:
    - `DeliverSubject()` option to configure the deliver subject of a JetStream consumer created by the `js.Subscribe()` call (and variants)
    - `BindDeliverSubject()` option to subscribe directly to a JetStream consumer deliver subject (bypassing any lookup or JetStream consumer creation)
    - Fields `DeliverGroup` in `ConsumerConfig`, `PushBound` in `ConsumerInfo`. They help making prevent incorrect subscriptions to JetStream consumers
    - Field `Last` in `SequencePair`
    
    Changed:
    - With a `PullSubscription`, calling `NextMsg()` or `NextMsgWithContext()` will now return `ErrTypeSubscription`. You must use the `Fetch()` API
    - If the library created internally a JetStream consumer, the consumer will be deleted on `Unsubscribe()` or when the `Drain()` completes
    - Fail multiple instances of a subscription on the same durable push consumer (only one active at a time). Also, consumers now have the concept of `DeliverGroup`, which is the queue group name they are created for. Only queue member from the same group can attach to this consumer, and a non queue subscription cannot attach to it. Note that this requires server v2.3.5
    - Attempting to create a queue subscription with a consumer configuration that has idle heartbeats and/or flow control will now result in an error
    
    Fixed:
    - Possible lock inversion
    - JetStream consumers could be incorrectly deleted on subscription's `Unsubscribe()`
    
    Resolves #785
    Resolves #776
    Resolves #775
    Resolves #748
    Resolves #747
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Aug 15, 2021
    Copy the full SHA
    45b7e77 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2021

  1. Add Domain to PubAck

    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Aug 16, 2021
    Copy the full SHA
    f730c02 View commit details
    Browse the repository at this point in the history
  2. Addresses comments change requests based on code review

    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Aug 16, 2021
    Copy the full SHA
    e077154 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2021

  1. Replaced BindDeliverSubject with SubjectIsDelivery

    As discussed with Matthias who came up with the idea, this is
    better because then we make use of the provided subject. Otherwise
    it was looking weird to have something which meaning was:
    ```
    js.SubscribeSync("ignored", nats.BindDeliverSubject("p.d4"))
    ```
    Instead you would now have:
    ```
    sub, err = js.SubscribeSync("p.d4", nats.SubjectIsDelivery())
    ```
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Aug 17, 2021
    Copy the full SHA
    4b8ebba View commit details
    Browse the repository at this point in the history