class ProcessorLoadBalanceStrategy {

    public LoadBalancingOperation balance(TrackingEventProcessor processor, String strategyName) {
//        String strategyName = repository.findById(processor)
//                                        .map(ProcessorLoadBalancing::strategy)
//                                        .orElse("default");
        LoadBalancingStrategy strategy =  strategyRepository.findByName(strategyName);
        io.axoniq.axonserver.component.processor.balancing.LoadBalancingStrategy.Factory factory = factories.getOrDefault(strategy.factoryBean(), NoLoadBalanceStrategy::new);
        return factory.create().balance(processor);
    }

    public  ProcessorLoadBalanceStrategy(
            LoadBalanceStrategyHolder strategyRepository,
            Map<String, io.axoniq.axonserver.component.processor.balancing.LoadBalancingStrategy.Factory> factories);

}