You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by Erin Oceng <er...@gmail.com> on 2006/06/12 20:50:12 UTC
Multithreaded MQ app
Hi,
I am writing multithreaded MQ app code, I am not sure if this is ok (pseudo
code)
Connection connection = createConnection();
for ( each thread i to 100 )
{
connection.createSession();
session.createProducer();
producer.sendMessages();
}
Or create connection and session first, then each thread will create its own
producer and send messages.
Thanks.
Eirn
--
View this message in context: http://www.nabble.com/Multithreaded-MQ-app-t1775770.html#a4834019
Sent from the ActiveMQ - Dev forum at Nabble.com.
Re: Multithreaded MQ app
Posted by James Strachan <ja...@gmail.com>.
This FAQ entry might help
http://incubator.apache.org/activemq/how-do-i-use-jms-efficiently.html
On 6/12/06, Erin Oceng <er...@gmail.com> wrote:
>
> Hi,
>
> I am writing multithreaded MQ app code, I am not sure if this is ok (pseudo
> code)
>
> Connection connection = createConnection();
>
> for ( each thread i to 100 )
> {
> connection.createSession();
> session.createProducer();
> producer.sendMessages();
> }
>
> Or create connection and session first, then each thread will create its own
> producer and send messages.
>
> Thanks.
>
>
> Eirn
>
>
> --
> View this message in context: http://www.nabble.com/Multithreaded-MQ-app-t1775770.html#a4834019
> Sent from the ActiveMQ - Dev forum at Nabble.com.
>
>
--
James
-------
http://radio.weblogs.com/0112098/