]
Miroslav Novak reassigned WFLY-10168:
-------------------------------------
Assignee: ehsavoie Hugonnet (was: Jeff Mesnil)
Unable to set global-client-thread-pool-max-size without setting
global-client-scheduled-thread-pool-max-size and vice versa
----------------------------------------------------------------------------------------------------------------------------
Key: WFLY-10168
URL:
https://issues.jboss.org/browse/WFLY-10168
Project: WildFly
Issue Type: Bug
Components: JMS
Affects Versions: 14.0.0.Final
Reporter: Martin Styk
Assignee: ehsavoie Hugonnet
Priority: Major
Logic in messaging integration doesn't allow configuring property
{{global-client-thread-pool-max-size}} without setting
{{global-client-scheduled-thread-pool-max-size}} and vice versa [1].
{code}
if (threadPoolMaxSize.isDefined()) {
threadPoolMaxSizeValue =
GLOBAL_CLIENT_THREAD_POOL_MAX_SIZE.resolveModelAttribute(context, operation).asInt();
} else if (sysprops.containsKey(THREAD_POOL_MAX_SIZE_PROPERTY_KEY)) {
threadPoolMaxSizeValue =
Integer.parseInt(sysprops.getProperty(THREAD_POOL_MAX_SIZE_PROPERTY_KEY));
} else {
// property is not configured using sysprop or explicit attribute
threadPoolMaxSizeValue = null;
}
if (scheduledThreadPoolMaxSize.isDefined()) {
scheduledThreadPoolMaxSizeValue =
GLOBAL_CLIENT_SCHEDULED_THREAD_POOL_MAX_SIZE.resolveModelAttribute(context,
operation).asInt();
} else if (sysprops.containsKey(SCHEDULED_THREAD_POOL_SIZE_PROPERTY_KEY)) {
scheduledThreadPoolMaxSizeValue =
Integer.parseInt(sysprops.getProperty(SCHEDULED_THREAD_POOL_SIZE_PROPERTY_KEY));
} else {
// property is not configured using sysprop or explicit attribute
scheduledThreadPoolMaxSizeValue = null;
}
if (threadPoolMaxSizeValue != null && scheduledThreadPoolMaxSizeValue != null) {
MessagingLogger.ROOT_LOGGER.debugf("Setting global client thread pool size to:
regular=%s, scheduled=%s", threadPoolMaxSizeValue, scheduledThreadPoolMaxSizeValue);
ActiveMQClient.setGlobalThreadPoolProperties(threadPoolMaxSizeValue,
scheduledThreadPoolMaxSizeValue);
}
{code}
If either of these properties is not defined, thread pool sizes are not set on
ActiveMQClient. User may want to set only one of these properties.
It seems that Artemis doesn't have API allowing configuration of single property.
Example:
# set global client thead pool max size using CLI -
/subsystem=messaging-activemq:write-attribute(name=global-client-thread-pool-max-size,value=300)
# as the condition 'threadPoolMaxSizeValue != null &&
scheduledThreadPoolMaxSizeValue != null' is not satisfied (the other propery is
undefined / null), set value 300 is not correctly configured on activemq.
https://github.com/wildfly/wildfly/blob/6c0a002da2558fd4e4f72ceb034a0633c...