Spring Integration manually start/stop channel adapter via control bus

Set autoStartup=”false” and either directly start()/stop() them, or use a <control-bus/> (send @myAdapter.start()). Getting a direct reference (autowire etc), depends on the endpoint type. If it’s a polled endpoint, inject a SourcePollingChannelAdapter; message-driven adapters vary, but generally are a MessageProducerSupport or MessagingGatewaySupport. EDIT: Read about the control-bus here. Give the inbound adapter an id attribute. … Read more

spring integration + cron + quartz in cluster?

Here’s one way… Set the auto-startup attribute on the inbound-adapter to false. Create a custom trigger that only fires once, immediately… public static class FireOnceTrigger implements Trigger { boolean done; public Date nextExecutionTime(TriggerContext triggerContext) { if (done) { return null; } done = true; return new Date(); } public void reset() { done = false; … Read more

Spring AMQP + RabbitMQ 3.3.5 ACCESS_REFUSED – Login was refused using authentication mechanism PLAIN

I am sure what Artem Bilan has explained here might be one of the reasons for this error: Caused by: com.rabbitmq.client.AuthenticationFailureException: ACCESS_REFUSED – Login was refused using authentication mechanism PLAIN. For details see the but the solution for me was that I logged in to rabbitMQ admin page (http://localhost:15672/#/users) with the default user name and … Read more

Spring multiple imapAdapter

Use multiple application contexts, configured with properties. This sample is an example; it uses XML for its configuration, but the same techniques apply with Java configuration. If you need them to feed into a common emailReceiverService; make the individual adapter contexts child contexts; see the sample readme for pointers about how to do that. EDIT: … Read more