Project: talendesb
Issue TESB-7707: Service Locator: Select wrong endpoints for evenDistributionSelectionStrategy and randomSelectionStrategy in case of a failover
1.register three endpoints in zookeeper:instance1,instance2,instance3 2.for the client,config as follow: {noformat} {noformat} and in org.talend.esb.locator.cfg,reloadAdressesCount is big enough: {noformat} locator.reloadAdressesCount=6000 {noformat} 3.DistributionSelectionStrategyClient send 30 messages to sl service,for three instance every receive 10 messages by round robin,it is ok as expected 4.let intance3 failover 5.send 30 messages again to sl service,instance3 not receive messages as expected but instance1 receive 29 messages,instance2 receive 1 messages,it is not expected. 6.there is a log about consumer side in attachement when failover,from log we can see: in step 5 send 30 messages,now first message send to instance2,second message want to send instance3,but it failover,so instead it and second message send to instance1,then problem happens: 3rd,4th,5th,....30th all left messages send to instance1.we expect after meet failover endpoint and replaced,continue the round robin. log only about when sending 30 messages again(in step 5),from log,can see which endpoint selected,eg: selecting from [http://provider:8083/services/tesb.test.participants.locatortwo_{color:blue}i1{color}.provider/soap/StandardTestServiceProvider/ means select instance1 Have similar problem for random strategy,after failover,also send to mainly one endpoint.
Story points: 1