> > > and if one instance of the Session and Connection object will be
> enough
> > > or if every thread needs their own
> > > Session and Connection.
> >
> > One connection seems to be enough (but you can use multiple
> connections
> > if you want). A session inherits a transaction context (the session's
> > input/output streams are transacted) and is per JMS definition
> > *single-threaded*. Thus, you need a session for every different
> > publishing thread.
> >
>
> Besides the above, I wonder if multiple threads can speed up message
> delivery
> ?!
A philosophical question? ;-)
> Assume in a single-threaded prog you have 100 msg/second, would two
> threads
> deliver
> (to the router) twice as many messages per second, even though maybe
> more
> instances of
> "Connection" would be needed (or not) or is there some limitation in
> the
> server/router ?!
There is no limitation. It's all dependent on the parameters (msg size,
msgs amount, persistence, number processors, number threads (context
switching), OS). On a single processor machine you can speed up delivery
with multiple threads by filling the wait-gaps of other threads, but you
have also more context switching and sync-points.
--
Andreas Mueller, [EMAIL PROTECTED], IIT GmbH, Bremen/Germany, http://www.iit.de
SwiftMQ, JMS Enterprise Messaging System, http://www.swiftmq.com
------------------------------------------------------
SwiftMQ developers mailing list * http://www.swiftmq.com
To unsubscribe from this list, send an eMail to
[EMAIL PROTECTED] and write in the body of your message:
UNSUBSCRIBE developers <your-email-address>
Archive: http://www.mail-archive.com/developers@mail.iit.de/