use of org.mule.runtime.api.scheduler.SchedulerConfig in project mule by mulesoft.
the class TransactionAwareWorkQueueProcessingStrategyFactory method create.
@Override
public ProcessingStrategy create(MuleContext muleContext, String schedulersNamePrefix) {
SchedulerConfig schedulerConfig = muleContext.getSchedulerBaseConfig().withName(schedulersNamePrefix + "." + BLOCKING.name());
if (getMaxConcurrency() != MAX_VALUE) {
schedulerConfig = schedulerConfig.withMaxConcurrentTasks(getMaxConcurrency());
}
SchedulerConfig finalSchedulerConfig = schedulerConfig;
return new TransactionAwareWorkQueueProcessingStrategy(() -> muleContext.getSchedulerService().ioScheduler(finalSchedulerConfig));
}
Aggregations