Fix clustering #511
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
java
question
refactor
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
agony-forge/agonyforge#511
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The
SessionAttributeServiceuses a local Map and doesn't actually use the Hazelcast Map which shares information across nodes. So it's likely that in a multi-server situation you couldn't actually interact with players on other members of the cluster.Got the Hazelcast map set up so that all servers can share attributes with each other, but there are some other problems. For example you can't talk to people on the other server, they don't see your movement, and only one server sees weather messages.
It seems to have something to do with headers being stripped by RabbitMQ, or maybe the messages being dropped entirely.
This appears to be a bug in Spring, caused by the fact that I'm logged in with the same OAuth account on both servers. In
UserDestinationMessageHandlerit checks the local sessions to see if the user is listed, and broadcasts to the other servers if it is not. Later, it tries to look up the websocket session to deliver the message to, but if it can't find it it just drops the message. In my particular scenario the same user is logged in on both servers but the correct session is on the other one. It never broadcasts because it found my user, but it never delivers a message because the local user session is the wrong one. This is really unfortunate for me being able to test whether the clustering works but it's also such an edge case that I think I'm going to call it and move on to other things.