((AbstractSender)sender).setMaxRetryAttempts(5);
}
*/
if (staticRoutes != null) {
StaticMembershipInterceptor smi = new StaticMembershipInterceptor();
for (URI staticRoute : staticRoutes) {
Member member;
try {
// The port has to match the receiver port
member = new StaticMember(staticRoute.getHost(), staticRoute.getPort(), 5000);
} catch (IOException e) {
throw new RuntimeException(e);
}
smi.addStaticMember(member);
logger.info("Added static route: " + staticRoute.getHost() + ":" + staticRoute.getPort());
}
smi.setLocalMember(map.getChannel().getLocalMember(false));
map.getChannel().addInterceptor(smi);
}
try {
map.getChannel().start(Channel.DEFAULT);