I am working on an application that uses Spring Framework/Spring-Integration. It exposes two web services and runs under websphere. During the processing of the webservice request the application generates performance numbers which I want to persist. I don't want to make the thread executing the webservice request wait for that. So I want to use a channel where the main thread just posts the performance data into the channel and continue (no waiting for it to be processed). On the other end of the channel I want a process that picks off one entry, persists and continue to the next entry in the channel. I want only one thread to be listening to do that work and keep other threads free to do the webservices work. I currently have this working with a pollable channel and a service activator that uses a fixed poller. What is the best setup to do this?
<si:channel id="ccc.performanceChannel"><si:queue capacity="10000"/></si:channel> <si:service-activator id="ccc.performanceActivator" ref="ccc.performanceWorkerAT" method="onMessage" input-channel="ccc.performanceChannel"> <si:poller fixed-delay="1000" task-executor="ccc.WorkManager"> <si:transactional transaction-manager="transactionManager"/> </si:poller> </si:service-activator>