Closed dkublik closed 1 day ago
created PR for this here -> https://github.com/Netflix/zuul/pull/1811
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
When Running Zuul Push Server in SSE (Server Sent Events), Push Protocol is not working correctly.
Problem Description
Messages mentioned below are never received by the client:
com.netflix.zuul.netty.server.push.PushProtocol.SSE
goAwayMessage()
serverClosingConnectionMessage()
all the calls of
com.netflix.zuul.netty.server.push.PushProtocol.sendErrorAndClose()
retry message from
com.netflix.zuul.sample.push.SampleSSEPushClientProtocolHandler.channelRead()
more over:
com.netflix.zuul.netty.server.push.PushRegistrationHandler.keepAlive()
will work only for websockets:Cause Explanation
This is because all of theses message are sent as String messages, and as such will be ignored by
HttpObjectEncoder.write()
(which is called byio.netty.handler.codec.http.HttpServerCodec
set incom.netflix.zuul.netty.server.push.PushChannelInitializer
)HttpObjectEncoder.write()
accepts only following typesso all not working protocol messages should be probably sent as
ByteBuf
(just likecom.netflix.zuul.netty.server.push.PushProtocol.SSE.sendPushMessage()
which works)How to Replicate
Launch Zuul Push Server
SampleServerStartup.SERVER_TYPE
toSSE
Bootstrap.main()
In first terminal window register to the Push Server with user ala:
In the second terminal window send message to user ala:
observe (in first terminal window) that no protocol messages are received (for example missing message "retry" below):
should be:
other messages (mentioned in the first paragraph will also be missing)