I have an component using lightning empAPi. In controller, I am using subscribe method and didn't using unsubscribe method. Is that required to use unsubscribe method in controller. IF required please let me know how to use it.
I have did some piece of code for unsubscribe method, please have a look and let me know if you need more details.
empApi.subscribe(channel, replayId, subscribeCallback).then(function(subscription){
component.set('v.subscription', subscription)
})
empApi.unsubscribe();
},
empApi.unsubscribe()
function. – Jayant Das Jun 7 '19 at 21:17