I think the problem is about *forking* and all address space of parent
process copied to fork process:

But the interesting thing is that i just send the pointer of my connection
and session to thread and this child process just used main process's
connection and session and its consumer/producers..

you are right 1 message is enqueued in the queue. the rest are in pending
list...

Anyway after this problem i research the problem a little bit more. I
realize that if you use a thread with ActiveMQ you should open a new session
for each thread.

I tried this i just send the connection pointer to thread and open a new
session and create a new consumer form it.
result: It is working with no problem.

Besides:
I also tried vfork function instead of fork in my thread .
result: it is working too.
But as you know the difference between fork and vfork functions. (i dont
want to use vfork it is dangerous)

yeap here it is all my experience with usage of activeMQ.
Maybe someone could explain the situation in details..



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Pending-Message-tp4672302p4672307.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to