A session is a single threaded context for sending and receiving messages.
An application can use a session to create messages, message producers, message consumers, queue browsers, and temporary destinations. An application can also use a session to run local transactions.
An application can create multiple sessions, where each session produces and consumes messages independently of the other sessions. If two message consumers in separate sessions, or even in the same session, subscribe to the same topic, they each receive a copy of any message published on that topic.
Unlike a Connection object, a Session object cannot be used concurrently on different threads. Only the Close Session method of a Session object can be called from a thread other than the one that the Session object is using at the time. The Close Session method ends a session and releases any system resources allocated to the session.
If an application needs to process messages concurrently on more than one thread, the application must first create the additional threads, and then use a different session on each thread.