I'd like to clear up a couple of points around SignalR. I have an application that reads trades (eg. stock codes that have associated stock prices streaming). The group for this SignalR hub is pitched at the stock code. It has a publisher that is started on startup (to read the streaming data) of the SignalR hub then a client(s) subscribes to certain stock codes. The workflow for this type of hub is fairly well documented.
I have a second hub that searches unrelated (to the above) data that is read from a table. The hub publisher for this hub is not started at hub startup. I have the publisher starting when the subscribe takes place. The subscribe receives the search criteria, creates a group (whose name is basically the search criteria). This type of hub is not overly clear to me. Specifically when and where I should unsubscribe when I enter different search criteria. At the moment I subscribe then receive a message back based on the search. When I enter different search criteria where should I unsubscribe - (a) sourced from the client, or (b) should I simply pass the old criteria with the 'next' search criteria and call the unsubscibe on the server (i.e. unsubscibe one and subscribe to another), or (c) do I need to explicitly unsubscribe ?
Any help would be greatly appreciated