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

Horizontal scaling with NATS #62

Merged
merged 8 commits into from
Jun 16, 2023
Merged

Horizontal scaling with NATS #62

merged 8 commits into from
Jun 16, 2023

Conversation

griffobeid
Copy link
Contributor

@griffobeid griffobeid commented Jun 14, 2023

Closes #59

@@ -49,6 +50,13 @@ services:
depends_on:
- postgres

nats:
Copy link
Member

Choose a reason for hiding this comment

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

Nice!!!

@darioalessandro
Copy link
Member

lgtm!!!

let sub = self
.nc
.queue_subscribe(&subject, &queue)
.unwrap()
Copy link
Member

Choose a reason for hiding this comment

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

This unwrap could cause a crash, can we deal with the failure here?

@darioalessandro darioalessandro dismissed their stale review June 15, 2023 22:17

found potential crash

msg: Arc::new(msg),
};

match session_recipient.try_send(msg) {
Copy link
Member

Choose a reason for hiding this comment

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

This looks like a .map_err instead of a match IMO, if there's an error Imo we should tear down the session altogether.

@darioalessandro darioalessandro merged commit f6ff054 into main Jun 16, 2023
@darioalessandro darioalessandro deleted the horizontal-scaling branch June 16, 2023 02:55
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.

Horizontally scalable server with NATS
2 participants