activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uma...@comcast.net
Subject Re: Message not sent to all Topic subscribers
Date Wed, 23 May 2007 18:51:09 GMT

Yes, the brokers are networked together - messages from VM1 come into
VM2. The only problem is that not all subscribers ('Postmaster's below)
get all the messages.

And all the messages are received by all the subscribers on VM1.

Could I use Hermes or the logger interceptor to debug this or
is my configuration basically wrong somewhere?

Thanks,

/U

 -------------- Original message ----------------------
From: "James Strachan" <james.strachan@gmail.com>
> And have you networked the brokers together? Also do things work with
> just a single broker running?
> 
> On 5/23/07, uma_rk@comcast.net <uma_rk@comcast.net> wrote:
> >
> > // On VM1:
> > <bean id="jmsFactory"
> >                 class="org.apache.activemq.ActiveMQConnectionFactory">
> >                 <property name="brokerURL">
> >                    
> <value>failover:(tcp://localhost:61616,tcp://VM2:61616)?initialReconnectDelay=10
> 0</value>
> >                 </property>
> >         </bean>
> >
> >         <bean id="messageDispatchTemplate"
> >                 class="org.springframework.jms.core.JmsTemplate">
> >
> >                 <property name="connectionFactory">
> >                         <ref bean="jmsFactory" />
> >                 </property>
> >
> >                 <property name="pubSubDomain">
> >                         <value>true</value>
> >                 </property>
> >         </bean>
> >
> > On VM2, the configuration is the same (and hence assymetrical):
> >
> > // On VM2:
> > <bean id="jmsFactory"
> >                 class="org.apache.activemq.ActiveMQConnectionFactory">
> >                 <property name="brokerURL">
> >                    
> <value>failover:(tcp://VM1:61616,tcp://localhost:61616)?initialReconnectDelay=10
> 0</value>
> >                 </property>
> >         </bean>
> >
> >         <bean id="messageDispatchTemplate"
> >                 class="org.springframework.jms.core.JmsTemplate">
> >
> >                 <property name="connectionFactory">
> >                         <ref bean="jmsFactory" />
> >                 </property>
> >
> >                 <property name="pubSubDomain">
> >                         <value>true</value>
> >                 </property>
> >         </bean>
> > .
> > The messages are sent to all subscribers on the local host.
> >
> > Thanks,
> >
> > /U
> >
> >  -------------- Original message ----------------------
> > From: "James Strachan" <james.strachan@gmail.com>
> > > On 5/23/07, uma_rk@comcast.net <uma_rk@comcast.net> wrote:
> > > >
> > > > I am connecting two (Tomcat) JDK 1.6 VMs using 4.1.1 external broker
> > > > as follows:
> > > >
> > > >      VM1 (broker 1)             <---------------------------------
 VM2
> > > (broker 2)
> > > >         (main: broker 1)
> > > (main: broker 1)
> > > >         (failover: broker 2)
> > > (failover: broker2)
> > > >
> > > > I have a topic MyConfigChange. There are three subscribers to
> > > > this topic on both VM1 and VM2 (one in each webapp of the Tomcat VM).
> > > >
> > > > I find that when VM1 publishes a message on this topic, the message is
> > > > not deivered to all the subscribers on VM2.
> > > >
> > > > Example:
> > > >     There are three webapps in VM2, and in each webapp, there is a 
> subscriber
> > > > to the topic MyConfigChange. Let's call the subscribers S1, S2 and S3.
> > > > When a webapp in VM1 publishes three MyConfigChange messages
> > > > M1, M2 and M3, I find that often S1 would get M1 and M2, and S2 would
get
> > > > M3. At other times, S1 and S2 would get M1, M3 and S3 would receive M2
> > > > and so on.
> > > >
> > > > Am I not guaranteed that all subscribers S1, S2 and S3 would receive all
> > > > the issues messages on the topic, regardless of where the message was
> > > published
> > > > (whether Vm1 or Vm2)?
> > > >
> > > > This is my configuration:
> > > >
> > > >       <bean
> > > >               id="MyConfigChangeMessageListener"
> > > >
> > > class="org.springframework.jms.listener.SimpleMessageListenerContainer"
> > > >         >
> > > >                <property name="sessionAcknowledgeModeName"
> > > value="AUTO_ACKNOWLEDGE"/>
> > > >                <property name="connectionFactory" ref="jmsFactory"
/>
> > > >                <property name="destination" ref="topicCONFIG_CHANGE"
/>
> > > >                <property name="messageListener" ref="Postmaster" />
> > > >         </bean>
> > > >
> > > > (There is one instance of "Postmaster" in each webapp).
> > > >
> > > > Any help appreciated,
> > >
> > > Does it work fine if you have just 1 broker? How are you networking
> > > the 2 brokers together? How are you configuring your
> > > ActiveMQConnectionFactory?
> > > --
> > > James
> > > -------
> > > http://macstrac.blogspot.com/
> >
> >
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/


Mime
View raw message