Yes - you do need to use a separate Session for each thread in that case

cheers,

Rob
On 17 Jan 2010, at 15:56, yair wrote:


Thanks again.

I have a problem with that:
I pop a message in one thread, work on it, and after a few seconds I am finished with it and then I need to commit (so that the job will be removed from the queue). I want to use the commit method of the consumer object. While the message in "invisible" (between popping and committing), another thread tries to do the same. This is problematic because this consumer is in
the middle of a transaction with the first thread. So I am creating a
consumer for each thread.
The problem is that committing on the consumer object doesn't seems to
delete the messages from the queue.

Does this means I need to create a session for each thread and commit using
the session object?

Thanks
Yair

--
View this message in context: 
http://old.nabble.com/Visibility-timeout-feature-tp27163663p27200125.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Rob Davies
http://twitter.com/rajdavies
I work here: http://fusesource.com
My Blog: http://rajdavies.blogspot.com/
I'm writing this: http://www.manning.com/snyder/





Reply via email to