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

Add "num_replicas" field for consumer #326

Closed
wants to merge 3 commits into from

Conversation

goku321
Copy link
Contributor

@goku321 goku321 commented Jul 6, 2022

This adds num_replicas field to allow configuring the number of replicas for a durable consumer.

@goku321
Copy link
Contributor Author

goku321 commented Jul 6, 2022

Hello @wallyqs . Would really appreciate if you can review this. A bit of urgent for us as we are moving to production and would want to be able to create R1 consumers.

tests/test_js.py Outdated Show resolved Hide resolved
@wallyqs
Copy link
Member

wallyqs commented Jul 6, 2022

Thanks, tests are passing for my locally but there is format issue that making the CI fail. I can take a look later also before merging and releasing later today.

@goku321
Copy link
Contributor Author

goku321 commented Jul 6, 2022

Sounds good. Appreciate your effort and time 👏

nc = await nats.connect()

js = nc.jetstream()
await js.add_stream(name="TESTREPLICAS", subjects=["test.replicas"])
Copy link

@shiv4289 shiv4289 Jul 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @wallyqs Is there a way to make this stream R3 in the test case here?
This would strengthen the test so the streams is R3 and consumer is R1 and we can be 100% sure the replication factor for consumer is not inherited from the stream.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like that too, would have to make the tests run in cluster mode and right now they only run in single node (no helper for that in the tests atm)

@wallyqs
Copy link
Member

wallyqs commented Jul 7, 2022

Included with format fixes as part of #327
Thanks for the contribution!

@wallyqs wallyqs closed this Jul 7, 2022
@goku321 goku321 deleted the add-replica-field branch July 11, 2022 05:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants