Using ActiveMQ 4.1

I have a producer that does the following -

1. main thread creates a Connectionfactory using tcp
2. creates a few threads - say 5
3. each thread creates a new Connection and a new Session using the
connectionfactory created in the main thread. Session is created with
auto-ack and no transaction
4. each thread creates a producer(Queue) and a message and sends it to a
Queue. This is done a few times in a loop (say 10)
5. main thread waits for the spawned threads to complete the tasks

In the above example the queue should have 5x10 = 50 msgs on the broker. But
I consistently don't see 50msgs. I check this using jconsole. 

Configuration: 
Broker : persistent=true , using kaha persistence
Connectionfactory: AsyncSend=false

Can you please let me know if I am missing something or is this is a known
bug in Active MQ4.1?

BTW, If I run my producer as a single threaded appplication then I see all
messages in the broker. If I run multiple instances of the single threaded
producer application, then I see all messages. 

TIA 


-- 
View this message in context: 
http://www.nabble.com/Missing-messages-in-multithreaded-producer-tf4388977s2354.html#a12513434
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to