How to customize start/stop of aws s3 inbound-channel-adapter . I want to set auto-startup="false" initially and start manually when server starts.Looking for a solution which is similar like we have the below solution for file inbound channel adaptor.
inboundFileAdapterChannel.send(new GenericMessage("@'s3FilesChannelId.adapter'.start()"));
Config:
If i try the same approach for s3 inbound adapter channel . I am getting the below error
APPLICATION FAILED TO START
Description:
A component required a bean named 's3FilesChannelId.adapter' that could not be found.
Action:
Consider defining a bean named 's3FilesChannelId.adapter' in your configuration.
Let's assume we have a channel adapter like this:
Pay attention to the
auto-startup="false"
and to theid="s3Inbound"
.So, it isn't going to be started automatically after application context initialization. However using that
s3Inbound
id we can do that manually whenever it is convenient for us.Your story about
inboundFileAdapterChannel
is not clear though, but you still can inject aLifecycle
for the mentioned channel adapter and perform itsstart()
:The piece of code about
inboundFileAdapterChannel
seems like a reference to theControl Bus
approach, but that's already slightly different story: https://docs.spring.io/spring-integration/docs/current/reference/html/system-management-chapter.html#control-bus