You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Michael Studman (JIRA)" <ji...@activemq.org> on 2006/03/01 15:06:22 UTC

[jira] Created: (SM-337) JMSFlow routes to components before they're started

JMSFlow routes to components before they're started
---------------------------------------------------

         Key: SM-337
         URL: http://jira.activemq.org/jira//browse/SM-337
     Project: ServiceMix
        Type: Bug

  Components: servicemix-core  
    Versions: 3.0, 2.0.2    
 Environment: Windows XP, SM 2.0.2
    Reporter: Michael Studman


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 with 3.0.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (SM-337) JMSFlow routes to components before they're started

Posted by "Guillaume Nodet (JIRA)" <ji...@activemq.org>.
     [ http://jira.activemq.org/jira//browse/SM-337?page=all ]
     
Guillaume Nodet resolved SM-337:
--------------------------------

      Assign To: Guillaume Nodet
     Resolution: Fixed
    Fix Version: 3.0-M1

Author: gnodet
Date: Mon Mar  6 15:19:33 2006
New Revision: 383702

URL: http://svn.apache.org/viewcvs?rev=383702&view=rev


> JMSFlow routes to components before they're started
> ---------------------------------------------------
>
>          Key: SM-337
>          URL: http://jira.activemq.org/jira//browse/SM-337
>      Project: ServiceMix
>         Type: Bug

>   Components: servicemix-core
>     Versions: 3.0, 2.0.2
>  Environment: Windows XP, SM 2.0.2
>     Reporter: Michael Studman
>     Assignee: Guillaume Nodet
>      Fix For: 3.0-M1

>
>
> 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 with 3.0.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.activemq.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira