Multi Thead Producer
"Tamoyo Vitali" <tamoyo.vitali-+4n8Pjbed72QlJb33dTly1/I71DsQ//[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <66150DEA041C2D4CA39D7096B032126C9780AC@exchange.supportcomm.com.br> |
Hi all!! I am writing a java program to send messages to a queue in a multithread scenario. Each thread has exclusive objects such as connection, queue, sender, session. Inside each thread there is a loop that sends sequentially messages. When I run this program witha single thread, the time to send each message in a persistent autoacknolodge mode is 80 miliseconds, When I run the same program with 2 theads the time to send each message increases to 160 ms, with 3 theads it goes to 240 ms, with 4 threads 320 ms a so on... This is the expected results (the time to deliver increases deppendin on the number os queuesenders) ??? Is I run the same program in two diferents processes each one with just one thread they ane not affected and both takes 80 ms for each message) Am I doind any wrong? best regards!!! Tamoyo C. Vitali Jr. Gerente de Desenvolvimento SupportComm Rua da Assembléia, 100 - 19 Andar Rio de Janeiro, RJ 20011-000 Tel: +55 21 3806-3340 / Cel: +55 21 8123-5182 mailto:tamoyo.vitali-+4n8Pjbed72QlJb33dTly1/I71DsQ//[email protected] www.supportcomm.com.br