Closed amjedomar closed 2 years ago
The answer to this question exists on StackOverflow: https://stackoverflow.com/questions/71578212/what-is-the-difference-between-socket-io-redis-adapter-and-redis-emitter/71602798#71602798
Hi! There is a diagram in the documentation explaining the duties of each package:
Source: https://socket.io/docs/v4/adapter/
The adapter is a component inside the Socket.IO server, while the emitter can be used in another process/service.
If you find something that is not clear enough, please ping me. Thanks!
Thanks, @darrachequesne for the answer.
I have spent hours to figuring the difference between the two. I know the difference seems quite easy to notice but I was confused the first time.
I had already answered my question that I asked at StackOverflow: https://stackoverflow.com/questions/71578212/what-is-the-difference-between-socket-io-redis-adapter-and-redis-emitter/71602798#71602798
But I liked your answer as it is very short.
The adapter is a component inside the Socket.IO server, while the emitter can be used in another process/service.
So I quoted it and added it to my answer at StackOverflow to help future people know the difference.
While I'm reading this article from the Socket.io documentation
I found that the following two packages
@socket.io/redis-adapter
and@socket.io/redis-emitter
are used to emit data to the clients that are on the other servers.Are these two packages different? And if yes what is the difference? And when to use one instead of the other?