.NET best practices for lifetimes/instancing of context/session?
We are looking to add Solace support for publishing/receiving from Solace Topics & Queues to our existing .NET C# codebase that already handles MSMQ and MQ. One thing that I have not come across in the documentation / examples is how we should be instancing the IContext and ISession - the code examples simply create one of every object to send/receive a single message and exit which isn't quite a "real world" example .
For instance with MQ if we wanted to listen to four queues we create four threads each listening to their specific queue and processing their messages. If we were to apply this same pattern to Solace, the question becomes how we should be instancing/sharing across those threads. Should we have a single IContext for our executable process, shared by all listening and publishing threads? Then within that do we have a single ISession shared by all, or should each listening thread create it's own ISession? We also have other code doing publishing - should each thread publishing a message create an ISession/dispose after sending a message or share a single ISession with the listening threads...
Suggestions or pointing me to something I missed would be much appreciated!