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

Are listener methods have to be asynchronous for non-blocking behavior at socket level? #861

Open
rgampa opened this issue Aug 25, 2022 · 0 comments

Comments

@rgampa
Copy link

rgampa commented Aug 25, 2022

Hi,

We are using version 1.7.18

we have this code in our project,

server.addEventListener("usermessage", MessageObject.class, this::handleUserMessage);

We recently noticed that additional lag/delay in the method handleUserMessage() due to additional business logic is causing more ping timeout errors at client side and in turn causing more socket disconnects.

So we have made the business logic inside handleUserMessage() asynchronous, which eliminated the ping timeout errors in our lower environment. We are yet to deploy to production, but we are curious how it has fixed the issue.

We recently also noticed some nodes in application cluster processing messages faster than others though all are of type same hardware, we assume the root cause for this also same where handleUserMessage() slowing down new events being picked up and processed in nodes which are getting large volume of message than other nodes.

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

No branches or pull requests

1 participant