[jboss-jira] [JBoss JIRA] (WFLY-10168) Unable to set global-client-thread-pool-max-size without setting global-client-scheduled-thread-pool-max-size and vice versa

Miroslav Novak (Jira) issues at jboss.org
Mon Nov 19 06:04:00 EST 2018


    [ https://issues.jboss.org/browse/WFLY-10168?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13663222#comment-13663222 ] 

Miroslav Novak commented on WFLY-10168:
---------------------------------------

Issue is still valid in WF master/14.

> 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
>            Reporter: Martin Styk
>            Assignee: Jeff Mesnil
>            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/6c0a002da2558fd4e4f72ceb034a0633c7b1dafd/messaging-activemq/src/main/java/org/wildfly/extension/messaging/activemq/MessagingSubsystemAdd.java#L114



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list