Details
-
Bug
-
Resolution: Done
-
Major
-
14.0.0.Final
-
None
Description
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].
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); }
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.