activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: onMessage() synchronisation requirements for queue+topic consumer
Date Wed, 03 Dec 2008 06:26:00 GMT
Hi David,

this is indeed strange - and I suspect the TaskRunnerFactory we use  
maybe at fault.
Can you set the System Property  
org.apache.activemq.UseDedicatedTaskRunner=true for your client  
instead of the synchronized onMessage() - and let me know if it  
behaves correctly ?


cheers,

Rob

Rob Davies
http://fusesource.com
http://rajdavies.blogspot.com/



On 1 Dec 2008, at 09:42, David Sitsky wrote:

> Hi,
>
> I think this might be an easy question, but I have an application  
> where
> my onMessage() handler is a consumer for both topic and queue  
> messages.
>
> The topic and queue consumer are derived from the same ActiveMQ  
> session,
> so I was under the impression that my onMessage() handler would not be
> called concurrently.
>
> However, I have a list that I iterate over and add elements too, which
> is only called via my onMessage() handler, and I see concurrency  
> issues
> occurring.
>
> When I add synchronized to the onMessage() method, all works well.
>
> Am I doing something wrong, or is this the expected behaviour?
>
> -- 
> Cheers,
> David
>
> Nuix Pty Ltd
> Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280  
> 0699
> Web: http://www.nuix.com                            Fax: +61 2 9212  
> 6902


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message