Socket.IO Connection state recovery causing issue by changing the format of the payload to an array
I am using socket.io for my chat application and completed both the implementation on both the backend and frontend. Recently I started to horizontally scale the system, integrated adapters and it all works fine, but I tried to implement the Connection state recovery so that the connected users can still use the system when the connected server crashes. Reference : https://socket.io/docs/v4/connection-state-recovery#disclaimer
socket.io capturing compressed outbound messages
I’m trying to figure out how to log the bytes transferred out per socket for a socket.io 4 server for a long running message streaming application. I have perMessageDeflate enabled, and I’m able to log the onAnyOutbound messages, but none of them are compressed. Is there a way I can capture the actual payloads being sent after compression or at least get their size ? This would be on a per-message basis, not on disconnect.