|
|
|
@ -24,6 +24,7 @@ import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.BeanUtils; |
|
|
|
import org.springframework.beans.factory.BeanInitializationException; |
|
|
|
import org.springframework.beans.factory.BeanInitializationException; |
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Qualifier; |
|
|
|
import org.springframework.context.ApplicationContext; |
|
|
|
import org.springframework.context.ApplicationContext; |
|
|
|
import org.springframework.context.ApplicationContextAware; |
|
|
|
import org.springframework.context.ApplicationContextAware; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
import org.springframework.context.annotation.Bean; |
|
|
|
@ -149,7 +150,8 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public AbstractSubscribableChannel clientInboundChannel(TaskExecutor clientInboundChannelExecutor) { |
|
|
|
public AbstractSubscribableChannel clientInboundChannel( |
|
|
|
|
|
|
|
@Qualifier("clientInboundChannelExecutor") TaskExecutor clientInboundChannelExecutor) { |
|
|
|
ExecutorSubscribableChannel channel = new ExecutorSubscribableChannel(clientInboundChannelExecutor); |
|
|
|
ExecutorSubscribableChannel channel = new ExecutorSubscribableChannel(clientInboundChannelExecutor); |
|
|
|
channel.setLogger(SimpLogging.forLog(channel.getLogger())); |
|
|
|
channel.setLogger(SimpLogging.forLog(channel.getLogger())); |
|
|
|
ChannelRegistration reg = getClientInboundChannelRegistration(); |
|
|
|
ChannelRegistration reg = getClientInboundChannelRegistration(); |
|
|
|
@ -185,7 +187,8 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public AbstractSubscribableChannel clientOutboundChannel(TaskExecutor clientOutboundChannelExecutor) { |
|
|
|
public AbstractSubscribableChannel clientOutboundChannel( |
|
|
|
|
|
|
|
@Qualifier("clientOutboundChannelExecutor") TaskExecutor clientOutboundChannelExecutor) { |
|
|
|
ExecutorSubscribableChannel channel = new ExecutorSubscribableChannel(clientOutboundChannelExecutor); |
|
|
|
ExecutorSubscribableChannel channel = new ExecutorSubscribableChannel(clientOutboundChannelExecutor); |
|
|
|
channel.setLogger(SimpLogging.forLog(channel.getLogger())); |
|
|
|
channel.setLogger(SimpLogging.forLog(channel.getLogger())); |
|
|
|
ChannelRegistration reg = getClientOutboundChannelRegistration(); |
|
|
|
ChannelRegistration reg = getClientOutboundChannelRegistration(); |
|
|
|
@ -221,8 +224,9 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public AbstractSubscribableChannel brokerChannel(AbstractSubscribableChannel clientInboundChannel, |
|
|
|
public AbstractSubscribableChannel brokerChannel( |
|
|
|
AbstractSubscribableChannel clientOutboundChannel, TaskExecutor brokerChannelExecutor) { |
|
|
|
AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel, |
|
|
|
|
|
|
|
@Qualifier("brokerChannelExecutor") TaskExecutor brokerChannelExecutor) { |
|
|
|
|
|
|
|
|
|
|
|
MessageBrokerRegistry registry = getBrokerRegistry(clientInboundChannel, clientOutboundChannel); |
|
|
|
MessageBrokerRegistry registry = getBrokerRegistry(clientInboundChannel, clientOutboundChannel); |
|
|
|
ChannelRegistration registration = registry.getBrokerChannelRegistration(); |
|
|
|
ChannelRegistration registration = registry.getBrokerChannelRegistration(); |
|
|
|
@ -411,7 +415,7 @@ public abstract class AbstractMessageBrokerConfiguration implements ApplicationC |
|
|
|
public MessageHandler userRegistryMessageHandler( |
|
|
|
public MessageHandler userRegistryMessageHandler( |
|
|
|
AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel, |
|
|
|
AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel, |
|
|
|
SimpUserRegistry userRegistry, SimpMessagingTemplate brokerMessagingTemplate, |
|
|
|
SimpUserRegistry userRegistry, SimpMessagingTemplate brokerMessagingTemplate, |
|
|
|
TaskScheduler messageBrokerTaskScheduler) { |
|
|
|
@Qualifier("messageBrokerTaskScheduler") TaskScheduler messageBrokerTaskScheduler) { |
|
|
|
|
|
|
|
|
|
|
|
MessageBrokerRegistry brokerRegistry = getBrokerRegistry(clientInboundChannel, clientOutboundChannel); |
|
|
|
MessageBrokerRegistry brokerRegistry = getBrokerRegistry(clientInboundChannel, clientOutboundChannel); |
|
|
|
if (brokerRegistry.getUserRegistryBroadcast() == null) { |
|
|
|
if (brokerRegistry.getUserRegistryBroadcast() == null) { |
|
|
|
|