title: How to create an Observable which updates it's value every 10 seconds (interval) only if subscribed?
body: <p>I am building an angular app with RxJS. In my StoreService I want to have an Observable, which my components can subscribe from. The Observable
  <code>public unreadMessagesCount: Observable&lt;number&gt;</code> holds the value of unread messages coming from the api.</p>
  
  <p>Every 10 seconds the api call should be done and the observable should update itself with the new value. BUT if no component has a subscription on this observable, the polling should not be done. And when someone subscribes, it should be done immediately. So that the data is up to date from the start.</p>
  
  <p>Is there an elegant way to build this with RxJS? Thanks in advance!</p>