Announcement Announcement Module
Collapse
No announcement yet.
PollingConsumer - fixed-delay issue with gateway and service activator Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 03:54 AM.
Working...
X