I have a component where I make an API call repeatedly every 2 seconds and when the response contains a record with name = \'somename\', I stop looping it by calling unsubscribe