Do you actually NEED multiple connections?

IIRC each Session is effectively a thread of execution. I'm not sure how
exactly pulling messages off the
connection is implemented without going through the code, but just from a
basic understanding of how
JCA and the J2EE container normally manage resources it wouldn't seem to me
to be required to have
several connections. As messages come in on the one connection they should
get dispatched to the
MDB container in parallel via different sessions (or at least the internal
implementation aught to be the
same effect). I guess the results could depend on J2EE container internals,
but it seems to me any good
implementation should give good performance with one connection in general.


drvillo wrote:
> 
> Hi all
> 
> I have some problems understanding how connection/session
> pooling with jencks works, I would apreciate if someone could give me 
> some help...
> 
> 
> I understand the use of maxSessions on an activationspec, and also
> what the threadpool attribute of a JCAContainer is for. 
> What I don't get, is why if I specify maxSessions=1 I still
> see that messages are consumed by multiple threads (looking 
> at the logs). This is in principle fine with me, as threads are retrieved
> by a pool but reading this 
> http://www.nabble.com/-activemq-user--maxSessions-limits-messages-fetched--tf254599.html#a773237
> it seems that I should see always the same one consuming messages.
> 
> Another thing about pooling: why I get always
> a single subscription on  a queue, even if pooling the listeners with a 
> TargetSourceMessageListener? What is the point of having a pool
> of identical stateless listeners if they all share the same connection?
> 
> My primary objective is to maximize throughput, thus I'd like to have
> a pool of listeners which consume messages using multiple connections,
> is it possible to do so using a single JCAConnector or I have to 
> statically declare more of them?
> 
> Wrapping up, are these two arguments (tweaking maxSessions, threadPool and
> such, and 
> having more parallelism) related?
> 
> I hope someone can help me on this, it's pretty hard to tune a system
> without understanding the effect of its parameters...
> 
> Thanks a lot
> Francesco
> 
>  
> 

-- 
View this message in context: 
http://www.nabble.com/Configuring-session-connection-pooling-to-maximize-throughput-tf2925304.html#a8225103
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to