I am building an enterprise application and i am using active mq for internal communication between applications. When i use task executor with my poller AbstractPollingEndpoint and ErrorHandlingTaskExecutor object instances causes memory leak. Object counts in the heap increases even if the application is in idle mode. When i close this part of the code
.taskExecutor(outTaskExecutor)
the problem doesnot occur anymore. But we are preparing for a heavy traffic and we need no provide more threads in order to handle messages. What am i doing wrong? Can you help please?
Thank you
Executor Service outTaskExecutor = Executors.newFixedThreadPool(10);
IntegrationFlow jmsOutbound = IntegrationFlows.from(jmsInChannel)
.handle(Jms.outboundAdapter(this.jmsTemplate.getConnectionFactory())
.destinationExpression("headers['responseQueueName']")
, s -> s.poller(p -> p.fixedDelay(pollerDelay).taskExecutor(outTaskExecutor)).get())
.get();
this.flowContext.registration(jmsOutbound).id("jmsOutbound").register();