$ the-wire · showcase
Spring AMQP honors autoStartup after registry restart
By RepoJournal · Filed · About Spring
Spring AMQP now correctly honors autoStartup=false for listener containers after a context restart.
Spring AMQP 3.0+ honors `autoStartup` after a `RabbitListenerEndpointRegistry` restart [1]. The `contextRefreshed` flag was set on `ContextRefreshedEvent` and never cleared, so any `start()` after the first refresh, including one triggered by `ConfigurableApplicationContext.restart()` (Spring Framework 7.0.3+ test context pause/resume), unconditionally started all listener containers, ignoring `autoStartup=false`. The fix resets `contextRefreshed` in `stop()`, matching the same fix in Spring for Apache Kafka's `KafkaListenerEndpointRegistry` [2]. Spring Boot adds javadoc and sources variants to spring-graphql and spring-framework dependencies [3][4], closing gh-51499 and gh-51494. Spring Kafka's `deploy-docs.yml` adds `contents: read` because private GitHub repos set this permission to `none` by default [5]. Merges across Spring Boot branches (4.0.x into 4.1.x, and 4.1.x) bring the changes forward . Total this period: 8 commits and 1 PR across the three repos.
Action items
- → Test listener containers with autoStartup=false after application context restart, upgrade to the fixed Spring AMQP build spring-projects/spring-amqp [plan]
- → Verify Spring Boot dependency variants resolve when building with Maven or Gradle spring-projects/spring-boot [monitor]
- → Add contents: read to deploy-docs.yml in private GitHub repos for docs deployment spring-projects/spring-kafka [immediate]
References
- [1] Honor `autoStartup` after `RabbitListenerEndpointRegistry` restart ↗ spring-projects/spring-amqp
- [2] GH-3601: Honor `autoStartup` after `RabbitListenerEndpointRegistry` restart ↗ spring-projects/spring-amqp
- [3] Add javdoc and sources variants to spring-graphql dependencies ↗ spring-projects/spring-boot
- [4] Add javdoc and sources variants to spring-framework dependencies ↗ spring-projects/spring-boot
- [5] Add `contents: read` into `deploy-docs.yml` ↗ spring-projects/spring-kafka