-
Notifications
You must be signed in to change notification settings - Fork 29
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
vertx.eventBus.send() always registers a reply handler #24
Comments
Yeah, Option with a default value of None sounds good to me. The Java API uses null as a way to figure out whether the reply handler needs to be registered or not. An Option would allow us to transform the optional reply handler from something that's Scala friendly to Java API. On the Java side, EventBus.send() javadoc should be clearer on what values are allowed for replyHandler :| |
While running load tests, throwing 500K string messages on the bus, I run into a memory leaks related to using Basically, with either a no-op reply handler |
Can you test this again with #63 applied, please? |
Please reopen / open a new issue if you still find leaks with registering (or unregistering) handlers. |
IIRC this is a leak, if you don't send a reply back from the server side. It would register a handler but that would never be executed.
I guess the default value should just be
null
and it be disregarded by Vert.x in the Java core. Not sure whether this is the best approach, though. Probably better use an Option and then call the according Java API function.The text was updated successfully, but these errors were encountered: