@Bean public ThreadPoolTaskExecutor brokerChannelExecutor() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ThreadPoolTaskExecutor executor; if (reg.hasTaskExecutor()) { executor = reg.taskExecutor().getTaskExecutor(); } else { // Should never be used executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(0); executor.setMaxPoolSize(1); executor.setQueueCapacity(0); } executor.setThreadNamePrefix("brokerChannel-"); return executor; }
@Bean public AbstractSubscribableChannel brokerChannel() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ExecutorSubscribableChannel channel = (reg.hasTaskExecutor() ? new ExecutorSubscribableChannel(brokerChannelExecutor()) : new ExecutorSubscribableChannel()); reg.interceptors(new ImmutableMessageChannelInterceptor()); channel.setLogger(SimpLogging.forLog(channel.getLogger())); channel.setInterceptors(reg.getInterceptors()); return channel; }
@Bean public ThreadPoolTaskExecutor brokerChannelExecutor() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ThreadPoolTaskExecutor executor; if (reg.hasTaskExecutor()) { executor = reg.taskExecutor().getTaskExecutor(); } else { // Should never be used executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(0); executor.setMaxPoolSize(1); executor.setQueueCapacity(0); } executor.setThreadNamePrefix("brokerChannel-"); return executor; }
@Bean public AbstractSubscribableChannel brokerChannel() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ExecutorSubscribableChannel channel = (reg.hasTaskExecutor() ? new ExecutorSubscribableChannel(brokerChannelExecutor()) : new ExecutorSubscribableChannel()); reg.interceptors(new ImmutableMessageChannelInterceptor()); channel.setLogger(SimpLogging.forLog(channel.getLogger())); channel.setInterceptors(reg.getInterceptors()); return channel; }
@Bean public ThreadPoolTaskExecutor brokerChannelExecutor() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ThreadPoolTaskExecutor executor; if (reg.hasTaskExecutor()) { executor = reg.taskExecutor().getTaskExecutor(); } else { // Should never be used executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(0); executor.setMaxPoolSize(1); executor.setQueueCapacity(0); } executor.setThreadNamePrefix("brokerChannel-"); return executor; }
@Bean public ThreadPoolTaskExecutor brokerChannelExecutor() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ThreadPoolTaskExecutor executor; if (reg.hasTaskExecutor()) { executor = reg.taskExecutor().getTaskExecutor(); } else { // Should never be used executor = new ThreadPoolTaskExecutor(); executor.setCorePoolSize(0); executor.setMaxPoolSize(1); executor.setQueueCapacity(0); } executor.setThreadNamePrefix("brokerChannel-"); return executor; }
@Bean public AbstractSubscribableChannel brokerChannel() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ExecutorSubscribableChannel channel = (reg.hasTaskExecutor() ? new ExecutorSubscribableChannel(brokerChannelExecutor()) : new ExecutorSubscribableChannel()); reg.interceptors(new ImmutableMessageChannelInterceptor()); channel.setLogger(SimpLogging.forLog(channel.getLogger())); channel.setInterceptors(reg.getInterceptors()); return channel; }
@Bean public AbstractSubscribableChannel brokerChannel() { ChannelRegistration reg = getBrokerRegistry().getBrokerChannelRegistration(); ExecutorSubscribableChannel channel = (reg.hasTaskExecutor() ? new ExecutorSubscribableChannel(brokerChannelExecutor()) : new ExecutorSubscribableChannel()); reg.interceptors(new ImmutableMessageChannelInterceptor()); channel.setLogger(SimpLogging.forLog(channel.getLogger())); channel.setInterceptors(reg.getInterceptors()); return channel; }