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

[IMPROVED] Subscribe returns error if consumer config does not match #803

Merged
merged 2 commits into from Aug 24, 2021

Commits on Aug 23, 2021

  1. [IMPROVED] Subscribe returns error if consumer config does not match

    This is done to alert the user that consumer config is not changed
    as one would expect.
    
    This change is more tricky than expected. We can't simply compare
    user's consumer config with what is returned from the server.
    For once, there are configurations that may not be set by the
    user that were set when the consumer was created, that the lib
    should not fail. Let's say the consumer is created with a description,
    why fail the user if they don't pass the Description() option at all?
    
    The Description() option was actually missing, but this is a good
    example. But same could be say with for instance "optional start
    sequence". This may be something that is set when the consumer
    is first created (possibly outside of the app with CLI), but when
    user calls js.Subscribe(), that option should not have to be
    set to the value that was used when creating the consumer.
    
    I had to add "not set" values for replay and deliver policy, similar
    to ack policy.
    
    I added an extensive test that checks proper error when trying
    to make configuration changes, but also that if the options are
    not set, then the lib does not fail the subscribe call.
    
    Resolves #796
    
    Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
    kozlovic committed Aug 23, 2021
    Copy the full SHA
    d5b5768 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2021

  1. js: Add a few more tests of config changes and defaults

    Signed-off-by: Waldemar Quevedo <wally@synadia.com>
    wallyqs committed Aug 24, 2021
    Copy the full SHA
    e2c6dff View commit details
    Browse the repository at this point in the history