activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjørn T Johansen <...@havleik.no>
Subject Re: Problem with topic...
Date Thu, 05 Feb 2009 11:40:19 GMT
Think I found the problem... Seems like there is a timing issue with the Spring listener (not
sure if it's just Spring or the way JMS works).
I thought when listening, I would receive all activity but the listener seem to be connecting
and disconnecting all the time, which makes it "loose"
some posts...
Switching to durable topic subscription seems to have solved the problem...


BTJ

On Thu, 5 Feb 2009 12:09:46 +0100
Bjørn T Johansen <btj@havleik.no> wrote:

> I have a problem when using topic... I have two listener that listen on the same topic..
But when I post a topic, sometimes both listeners read the
> topic and sometime only one reads the topic..
> 
> This is the configuration of the topic..:
> 
>     <bean id="xmlfilesAllDestination" class="org.apache.activemq.command.ActiveMQTopic">
>         <constructor-arg index="0" value="no.asp.nexstep.xmlfilesall"/>       

>     </bean>
> 
> 
> and this is the listeners:
> 
>     <jms:listener-container
>         transaction-manager="transactionManagerBoserver2"
>         destination-type="topic"
>         client-id="boserver2"
>         connection-factory="connectionFactoryBoserver2">
>         <jms:listener destination="no.asp.nexstep.xmlfilesall" ref="receiveMessage2"
method="processXMLMessageFromNexstep2"/>
>     </jms:listener-container>
> 
>     <jms:listener-container
>         transaction-manager="transactionManagerBoserver1"
>         destination-type="topic"
>         client-id="boserver1"        
>         connection-factory="connectionFactoryBoserver1">
>         <jms:listener destination="no.asp.nexstep.xmlfilesall" ref="receiveMessage2"
method="processXMLMessageFromNexstep"/>
>     </jms:listener-container>
> 
> 
> The problem is that the listenerer with client-id = boserver1 always get called when
a new post appears while listener boserver2 is only called most
> of the times...?
> 
> I have a test program that post a message to the topic every minute but as I said, the
listener for boserver2 is not called all the time but
> boserver1 is called every time..
> 
> Is this a configration problem? A bug in ActiveMQ? A bug in Spring or (using Spring 2.5.6
btw)?
> 
> 
> Regards,
> 
> BTJ
> 
> 

Mime
View raw message