if (childEndpoints.size() != 0) {
synCfg.removeSequence("main");
SequenceMediator mainSeq = new SequenceMediator();
mainSeq.setName("main");
InMediator in = new InMediator();
OutMediator out = new OutMediator();
out.addChild(new SendMediator());
mainSeq.addChild(in);
mainSeq.addChild(out);
SendMediator send = new SendMediator();
LoadbalanceEndpoint lb = new LoadbalanceEndpoint();
FilterMediator filterMediator = new FilterMediator();
in.addChild(filterMediator);
SynapseXPath xpath = new SynapseXPath("get-property('To')");
filterMediator.setSource(xpath);
filterMediator.setRegex(Pattern.compile("/carbon"));
PropertyMediator httpSCProperty = new PropertyMediator();