-
1. Re: Concurrently using ClientRequestor.request
ataylor Oct 8, 2012 2:09 PM (in response to thomaslo)1 of 1 people found this helpfulyou shouldnt be using it concurrently, underneath it uses the core API, like most messaging API (JMS included) it should always be used single threaded
-
2. Re: Concurrently using ClientRequestor.request
thomaslo Oct 8, 2012 2:15 PM (in response to ataylor)Andy, thanks for the response.
if that being the case, usually on client side what is the best approach to deal with concurrent request. Do I need to do a pool of session similar to connection pool?
Or can I possibly use a queue approach with single thread to dispatch request and notify response with unique request id because establishing many sessions seem to be a bit overkill
-
3. Re: Concurrently using ClientRequestor.request
jbertram Oct 8, 2012 2:31 PM (in response to thomaslo)You need a session per thread since sessions are single-threaded (as Andy mentioned). Whether or not you implement that with a pool or some kind of "queue" pattern doesn't really matter from my perspective.
-
4. Re: Concurrently using ClientRequestor.request
clebert.suconic Oct 9, 2012 1:29 PM (in response to jbertram)As everybody mentioned a Session represents the interaction of a thread. you can switch the context of a thread.. as long as you don't access it concurrently. (that goes to anything used within the session).