0

I am reading a message , transforming it and outputting on the JMS channel. The JMS channel uses a WorkManager Task Executor to read the messages and processes it. Even though we configured the WorkManager in application server to have 10 threads, only one thread is being used.

<si:chain id="prenotifchain" input-channel="preNotificationChannel"  output-channel="notificationJMSChannel">           
    <si:transformer id="prenotif"  method="transformRequest"  ref="notificationTransformer"/>   
</si:chain> 



<si-jms:channel id="notificationJMSChannel" queue="notificationQueue" connection-factory="queueConnectionFactory" transaction-manager="txManager" task-executor="notificationTaskExecutor"  />

<jee:jndi-lookup id="notificationQueue" jndi-name="jms/notifqueue"/>    


    <bean id="notificationTaskExecutor"
    class="org.springframework.scheduling.commonj.WorkManagerTaskExecutor">
    <property name="workManagerName" value="notifWM" />
    <property name="resourceRef" value="true" />
</bean>

Are we missing any configuration or is there another way to read multiple ?

user3749274
  • 31
  • 1
  • 4
  • What server are you using Weblogic or Websphere? Where did you configure the threads? Can you please show the configuration? Please provide the full name for your work manager class. – notionquest Sep 22 '18 at 19:22
  • The threads are configured in websphere admin console. We are using reference here in the executor – user3749274 Sep 22 '18 at 22:43

1 Answers1

0

Please, use concurrency attribute:

<xsd:attribute name="concurrency" type="xsd:string">
        <xsd:annotation>
            <xsd:documentation><![CDATA[
The number of concurrent sessions/consumers to start for each listener.
Can either be a simple number indicating the maximum number (e.g. "5")
or a range indicating the lower as well as the upper limit (e.g. "3-5").
Note that a specified minimum is just a hint and might be ignored at runtime.
Default is 1; keep concurrency limited to 1 in case of a topic listener
or if message ordering is important; consider raising it for general queues.
            ]]></xsd:documentation>
        </xsd:annotation>
    </xsd:attribute>
Artem Bilan
  • 113,505
  • 11
  • 91
  • 118
  • Thank you.If we add the concurreny attribute then what is the difference between concurrency and adding the taskexecutor threads ? Does taskexecutor threads ignored in this case ? Do I remove the taskexecutor attribute if it is ignored – user3749274 Sep 22 '18 at 22:46
  • The task executor doesn’t have value without concurrency, but it’s definitely better to support an executor as you do. Only the point that it is not going to work in parallel without concurrency – Artem Bilan Sep 23 '18 at 05:13