For an application I'm using spring-boot, spring-batch and spring-integration.
My problem is that, on startup, when everything is auto configured and auto wired, my spring-integration @MessageEndpoints, connected to RabbitMQ, are starting to process available messages on its queues. Based on the received messages, these @MessageEndpoints are trying to start specific spring-batch Jobs, looked up, through it's auto wired JobRegistery.
Because of all the auto configuration not all jobs are yet registered to the used JobRegistery! (A few seconds later they will be).
After all spring-batch jobs are registered to the JobRegistery then the @MessageEndpoints should start. Is this possible? Maybe thought the ContextRefreshEvent?