Skip to content

Commit 72842fc

Browse files
Document Lifecycle change of DefaultMessageListenerContainer.
1 parent 8c14216 commit 72842fc

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/main/antora/modules/ROOT/pages/migration-guide/migration-guide-4.x-to-5.x.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ static class Config extends AbstractMongoClientConfiguration {
6262

6363
Users upgrading from prior versions may choose `BigDecimalRepresentation.STRING` as default to retain previous behaviour.
6464

65+
== DefaultMessageListenerContainer auto startup
66+
67+
The `DefaultMessageListenerContainer` that can be used to listen to e.g. _Change Streams_ now defaults its `SmartLifecycle` auto startup to `true`.
68+
6569
== JMX Support Discontinued.
6670

6771
We recommend switching to Spring Boot https://docs.spring.io/spring-boot/reference/actuator/endpoints.html[Actuator Endpoints].

src/main/antora/modules/ROOT/pages/mongodb/change-streams.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ container.stop();
4444
<5> Do not forget to stop the container once you are sure you no longer need it. Doing so stops all running `Task` instances within the container.
4545
====
4646

47+
`DefaultMessageListenerContainer` implements `SmartLifecycle` and will by default be automatically started when registered as a Bean in the Application Context.
48+
4749
[NOTE]
4850
====
4951
Errors while processing are passed on to an `org.springframework.util.ErrorHandler`. If not stated otherwise a log appending `ErrorHandler` gets applied by default. +

0 commit comments

Comments
 (0)