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

[CHANGED] Simplified JetStream API changes and improvements #1300

Merged
merged 4 commits into from
Jun 8, 2023

Conversation

piotrpio
Copy link
Collaborator

@piotrpio piotrpio commented Jun 7, 2023

  • Fixed typo in PullThresholdBytes option
  • Removed push consumer only fields from ConsumerConfig
  • Removed context.Context from PublishAsync and PublishMsgAsync
  • Renamed AddConsumer to CreateOrUpdateConsumer - this change is introduced in anticipation for separation of create and update operations in nats-server. After they'll be introduced, there will be 3 methods:
    • CreateOrUpdateConsumer() - current upsert behavior
    • CreateConsumer() - will not overwrite consumer
    • UpdateConsumer() - will fail if consumer does not exist

@piotrpio piotrpio requested review from Jarema and wallyqs June 7, 2023 11:55
Copy link
Member

@Jarema Jarema left a comment

Choose a reason for hiding this comment

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

Looks good, but before LGTM:

Are we 100% sure, that in few months, we will not regret not having context in publish async? :)

@piotrpio
Copy link
Collaborator Author

piotrpio commented Jun 8, 2023

@Jarema I don't think so since we are not waiting for response from the server in the method itself, so really there is nothing to be canceled here.

@derekcollison
Copy link
Member

IIRC we could block PublishAsync based on the outstanding ack window.

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
Signed-off-by: Piotr Piotrowski <piotr@synadia.com>
@piotrpio piotrpio force-pushed the js-simplification-improvements branch from 270c2d1 to bfe9100 Compare June 8, 2023 16:19
@piotrpio piotrpio merged commit abd4cb0 into main Jun 8, 2023
1 of 2 checks passed
@piotrpio piotrpio deleted the js-simplification-improvements branch June 8, 2023 16:36
@piotrpio piotrpio mentioned this pull request Jun 12, 2023
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

4 participants