_logger.info("registering msg factory for type " + type);
int threadpoolSize = HelixTaskExecutor.DEFAULT_PARALLEL_TASKS;
String threadpoolSizeStr = null;
String key = type + "." + HelixTaskExecutor.MAX_THREADS;
ConfigAccessor configAccessor = _manager.getConfigAccessor();
if(configAccessor != null)
{
ConfigScope scope = null;
// Read the participant config and cluster config for the per-message type thread pool size.
// participant config will override the cluster config.
if(_manager.getInstanceType() == InstanceType.PARTICIPANT || _manager.getInstanceType() == InstanceType.CONTROLLER_PARTICIPANT)
{
scope = new ConfigScopeBuilder().forCluster(_manager.getClusterName()).forParticipant(_manager.getInstanceName()).build();
threadpoolSizeStr = configAccessor.get(scope, key);
}
if(threadpoolSizeStr == null)
{
scope = new ConfigScopeBuilder().forCluster(_manager.getClusterName()).build();
threadpoolSizeStr = configAccessor.get(scope, key);
}
}
if(threadpoolSizeStr != null)
{