Results 1 to 1 of 1

Thread: PollingConsumer - fixed-delay issue with gateway and service activator

  1. #1
    Join Date
    Dec 2012
    Location
    London
    Posts
    1

    Default PollingConsumer - fixed-delay issue with gateway and service activator

    It appears that the fixed-delay attribute is not doing what I would expect i.e. do not poll again until the last poll has completed. If I configure a simple gateway with a queue, service activator and poller with an executor, it seems to be continually adding polling requests to the executors internal queue. This will eventually mean the executors queue will fill up and we will then get RejectedExecutions
    If you use this config, but do not actually send any messages, then continually check the pool size you will see it continually increasing (new poll requests are being added)

    ThreadPoolTaskExecutor t = springContext.getBean("executor", ThreadPoolTaskExecutor.class);
    logger.debug("executor queue size={}",t.getThreadPoolExecutor().getQueue().size ());

    I have set the poller with receive-timeout=-1 so it will block until a message has arrived

    <int:service-activator input-channel="requestChannelPoll" ref="processor" method="processData">
    <intoller
    task-executor="si-executor"
    receive-timeout="-1"
    fixed-delay="100"/>
    </int:service-activator>

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

    Am I doing something wrong - surely it should not be continually adding new poll requests
    Last edited by aross; Dec 17th, 2012 at 03:54 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •