-
Notifications
You must be signed in to change notification settings - Fork 536
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
SockJSSocket: disable writeHandler by default #1221
Comments
@pmlopes @tsegismont what's your opinion on this ? |
Personally I would prefer that the consumer not be converted to local since we use this to route data to the web socket from across the cluster. If it were to be converted we'd have to start routing messages first to the correct target member so they could be sent. Certainly possible (we do it for other use cases), but does mean that you incur 2x the bus traffic for the same send. One function of our system is high volume event processing where clients can subscribe to events over WS, so this is a critical use case for us. Actually what we'd probably do is just install our own cluster wide consumer that does what this one does to replace it (and just skip using the one provided by Vert.x entirely). So from perspective I guess the impact is minimal (still would rather it stay as is though). |
I think this should be configurable ? |
my point is that inside Vert.x websocket/netsocket use local consumer. as you said, this feature is nothing but complicated to do yourself too. I don't want to create regressions either if people are using too... |
Making it configurable makes sense. |
@vietj So what we want to do for this? provide a flag to choose if register local consumer or global consumer? And we made this flag default to "global consumer"? |
@vietj on one hand, the use-case that @sfitts describes sounds quite compelling to me. On the other hand, I believe it's a waste of resources to register a consumer, even local, any time a netsocket, websocket or sockjssocket is created, because most apps don't use it. Consequently, I think we should add new options in Vert.x 4. Users like @sfitts who do need this feature could activate it, and choose whether or not they want the consumer to be local-only. |
agreed, it should not be the default in 4 |
Currently the
SockJSSocket
registers an event bus consumer to implement thewriteHandlerID
header. This is similar toWebSocket
andNetSocket
that do provide the same feature, however those use a local consumer.This should be changed to use a local consumer as well.
The text was updated successfully, but these errors were encountered: