Summary
In this chapter, we implemented a real-world example of consuming real-time messages coming from a WebSocket server in a reactive way. We explained the requirement and the context. Then, we explored the features of WebSocketSubject
and learned how we can consume real time messages through the WebSocketSubject
and how this special kind of Subject works. Finally, we learned how we can build a reconnection mechanism in a reactive way using WebSocketSubjectConfig
and the RxJS operators.
Now, it is time to learn how we can test the reactive patterns that we have built so far using RxJS, which we will see in the next chapter.