Update thread pool settings in STOMP/WebSocket config
The clientInboundChannel and clientOutboundChannel now use twice the number of available processors by default to accomodate for some degree of blocking in task execution on average. In practice these settings still need to be configured explicitly in applications but these should serve as better default values than the default values in ThreadPoolTaskExecutor. Issue: SPR-11450
This commit is contained in:
@@ -136,11 +136,11 @@ public class MessageBrokerBeanDefinitionParserTests {
|
||||
Arrays.<Class<? extends MessageHandler>>asList(SimpAnnotationMethodMessageHandler.class,
|
||||
UserDestinationMessageHandler.class, SimpleBrokerMessageHandler.class);
|
||||
testChannel("clientInboundChannel", subscriberTypes, 0);
|
||||
testExecutor("clientInboundChannel", 1, Integer.MAX_VALUE, 60);
|
||||
testExecutor("clientInboundChannel", Runtime.getRuntime().availableProcessors() * 2, Integer.MAX_VALUE, 60);
|
||||
|
||||
subscriberTypes = Arrays.<Class<? extends MessageHandler>>asList(SubProtocolWebSocketHandler.class);
|
||||
testChannel("clientOutboundChannel", subscriberTypes, 0);
|
||||
testExecutor("clientOutboundChannel", 1, Integer.MAX_VALUE, 60);
|
||||
testExecutor("clientOutboundChannel", Runtime.getRuntime().availableProcessors() * 2, Integer.MAX_VALUE, 60);
|
||||
|
||||
subscriberTypes = Arrays.<Class<? extends MessageHandler>>asList(
|
||||
SimpleBrokerMessageHandler.class, UserDestinationMessageHandler.class);
|
||||
@@ -199,11 +199,11 @@ public class MessageBrokerBeanDefinitionParserTests {
|
||||
Arrays.<Class<? extends MessageHandler>>asList(SimpAnnotationMethodMessageHandler.class,
|
||||
UserDestinationMessageHandler.class, StompBrokerRelayMessageHandler.class);
|
||||
testChannel("clientInboundChannel", subscriberTypes, 0);
|
||||
testExecutor("clientInboundChannel", 1, Integer.MAX_VALUE, 60);
|
||||
testExecutor("clientInboundChannel", Runtime.getRuntime().availableProcessors() * 2, Integer.MAX_VALUE, 60);
|
||||
|
||||
subscriberTypes = Arrays.<Class<? extends MessageHandler>>asList(SubProtocolWebSocketHandler.class);
|
||||
testChannel("clientOutboundChannel", subscriberTypes, 0);
|
||||
testExecutor("clientOutboundChannel", 1, Integer.MAX_VALUE, 60);
|
||||
testExecutor("clientOutboundChannel", Runtime.getRuntime().availableProcessors() * 2, Integer.MAX_VALUE, 60);
|
||||
|
||||
subscriberTypes = Arrays.<Class<? extends MessageHandler>>asList(
|
||||
StompBrokerRelayMessageHandler.class, UserDestinationMessageHandler.class);
|
||||
|
||||
Reference in New Issue
Block a user