Spring Control Bus to stop receiving emails -


i using spring integration filter incoming emails. i'd able stop , restart filtering on demand.

i have tried using control bus so, when stopping mail inbound channel, mail receiver keeps listening, , generating issues when emails received while inbound channel stopped.

i have tried stop service activator well, doesn't help.

i have configuration:

<int:channel id="receivechannel" datatype="javax.mail.internet.mimemessage"/> <int-mail:imap-idle-channel-adapter id="incomingemailsadapter" channel="receivechannel" <int:service-activator id="serviceactivator" input-channel="receivechannel" ref="mailservice" method="handlemail"/>          messagechannel controlchannel = ac.getbean("controlchannel", messagechannel.class); controlchannel.send(new genericmessage<string>("@incomingemailsadapter.stop()")); controlchannel.send(new genericmessage<string>("@serviceactivator.stop()")); 

what missing? help

gilles


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -