-
Notifications
You must be signed in to change notification settings - Fork 124
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
Conversation
@@ -49,6 +50,13 @@ services: | |||
depends_on: | |||
- postgres | |||
|
|||
nats: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!!
lgtm!!! |
actix-api/src/actors/chat_server.rs
Outdated
let sub = self | ||
.nc | ||
.queue_subscribe(&subject, &queue) | ||
.unwrap() |
There was a problem hiding this comment.
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?
actix-api/src/actors/chat_server.rs
Outdated
msg: Arc::new(msg), | ||
}; | ||
|
||
match session_recipient.try_send(msg) { |
There was a problem hiding this comment.
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.
Closes #59