Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2196

Expose the executor configuration attribute on the gateway

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 2.1 M3
    • Component/s: Core
    • Labels:

      Description

      Asynchronous Gateway is using SimpleAsyncTaskExecutor to spawn threads.
      Is it possible to configure Asynchronous Gateway with a thread pool to avoid thread creation overhead ?

      I was able to set the thread pool with in my code and it works.

      Spring Ctx

      Code:
      <task:executor id="myThreadPool" pool-size="10"/>

      <int:gateway
      id="MathGW1"
      default-request-channel="math.request.channel"
      default-reply-channel="math.reply.channel"
      service-interface="auto_startup.MathGW1">
      </int:gateway>Java Code

      Code:

      Executor threadPool = appCtx.getBean("myThreadPool", Executor.class);
      GatewayProxyFactoryBean gwBean = appCtx.getBean("&MathGW1", GatewayProxyFactoryBean.class);
      gwBean.setAsyncExecutor(threadPool);

        Attachments

          Activity

            People

            • Assignee:
              mark.fisher Mark Fisher
              Reporter:
              sashi202 sashi202
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: