You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Michael Studman <ms...@ovid.com> on 2006/02/28 13:36:11 UTC

JMSFlow routes to components before they're started?

I'm currently developing against 2.0.2 but my inspection of SVN seems to
show this problem is in 3.0 too.
 
So I have three ServiceMix containers each using JMSFlow. There are two
networked ActiveMQ brokers (tcp:server1 tcp:server2) and the containers'
jmsURL pointing to them both via "reliable:(tcp:server1,tcp:server2).
 
I'm trying to simulate one of the containers leaving the cluster
(killing the JVM with Ctrl-C) and then rejoining it to see how the
cluster handles clustering and load balancing under this scenario. What
I'm seeing is generally good but my MessageExchangeListener
implementing-component in the rejoining container is receiving messages
before its init() or start() methods are called.
 
I think I've tracked down the problem and it seems to be one of ordering
between the registry, flow and auto-deployer. When the auto-deployer
calls JBIContainer.activateComponent(...) for my component this causes
Registry.registerComponent(...) to fire an event which is handled by
JMSFlow.onEvent(ComponentEventPacket). onEvent here notifies the cluster
of the new component which gives the green light for others in the
cluster to deliver messages for the named component to this container.
The problem is when Registry.registerComponent(...) is called the
component hasn't yet been started but it is already added to the
registry's map and subsequently found when JMSFlow receives a request
from elsewhere in the cluster. A cursory glance at the SVN repository
indicates to me this is still a problem.
 
Thoughts?
 
Michael.
 
BTW: Do you guys have an approximate timeframe on when ServiceMix 3 will
be release?