Upgrade socket.io from v3 to v4

Following Upgrade socket.io from v2 to v3, this post is about upgrading socket.io and its associated packages to the latest versions as of when this post is written and the only setting changes seem to be from the redis-adapater and the way to import client io this time (for our specific use case).

Upgrade socket.io from v2 to v3

socket.io and its related libraries such as socket.io-redis-adapter and socket.io-redis-emitter had a few breaking changes in either functions or behaviors since v3 which might cause issues during the v2-to-v3 migration. This post lists what was encountered and how to solve it for specific use cases based on hands-on experience.