Hi,
first of all, thanks for the questions. Yes, as this is a simple example, all components that are subscribed will receive all incoming messages. To pass only specific messages to the component you must also add a message type to "event.data". Your 'event.data' could look something like: "{ listOfProducts: [], type: 'products' }", then you can filter messages by "type" in your WebSocketService and pass them into different Observables, so your components would subscribe only to the message type they need or pass all messages to one subscription, as it is done in example, and use "filter" operator in your components to filter out only messages the component is using. I would probably leave the service as simple as possible and make the components responsible for filtering messages they need. Also make a "enum" for all message types, for cleaner code. ;) I Hope I answered your questions :) if you need more help, you can write me an email: drejeris.liudas@gmail.com