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

NatsSub simplification and JetStream support #108

Merged
merged 6 commits into from
Aug 7, 2023
Merged

NatsSub simplification and JetStream support #108

merged 6 commits into from
Aug 7, 2023

Conversation

mtmk
Copy link
Collaborator

@mtmk mtmk commented Aug 7, 2023

  • Remove INatsSubBuilder interfaces: This is to reduce unnecessary complexity since NatsSubBase can be used as the contract in SubscriptionManager

  • Create a separation of public interfaces and internal handling for subscriptions by using INatsSub* interfaces for public methods and using NatsSubBase as the internal handling interface with internals exposed such as Pending messages.

  • Push responsibility of reconnections to SubscriptionManager so that not only we can renew subscriptions but in the case of JetStream consumers recovery, we can issue pull requests for example.

* Remove INatsSubBuilder interfaces: This is to reduce unnecessary complexity
  since NatsSubBase can be used as the contract in SubscriptionManager

* Create a separation of public interfaces and internal handling for
  subscriptions by using INatsSub* interfaces for public methods
  and using NatsSubBase as the internal handling interface with internals
  exposed such as Pending messages.

* Push responsibility of reconnections to SubscriptionManager so that
  not only we can renew subscriptions but in the case of JetStream
  consumers recovery, we can issue pull requests for example.
@mtmk mtmk requested a review from caleblloyd August 7, 2023 11:13
@caleblloyd
Copy link
Collaborator

Looks good, I like this approach! Want to clean up the commented sections so we can merge it?

@mtmk
Copy link
Collaborator Author

mtmk commented Aug 7, 2023

Looks good, I like this approach! Want to clean up the commented sections so we can merge it?

Brilliant! I shall clean it up.

@mtmk mtmk changed the title [POC] NatsSubX simplification and JetStream support NatsSub simplification and JetStream support Aug 7, 2023
@mtmk mtmk marked this pull request as ready for review August 7, 2023 18:29
Copy link
Collaborator

@caleblloyd caleblloyd left a comment

Choose a reason for hiding this comment

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

LGTM

@mtmk mtmk merged commit 68ea8d9 into main Aug 7, 2023
5 of 6 checks passed
@mtmk mtmk deleted the nats-sub-x-spike branch August 7, 2023 21:49
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.

2 participants