-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add startup failure policy to listeners (#824)
Previously, when a listener container failed to start, it would only log the exception. This commit introduces `StartupFailurePolicy` that allows listener containers to CONTINUE, STOP, RETRY when an error is encountered on startup. See #445 See #816
- Loading branch information
Showing
17 changed files
with
1,242 additions
and
106 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
.../main/antora/modules/ROOT/pages/reference/message-listener-startup-failure.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
= Handling Startup Failures | ||
include::../attributes/attributes-variables.adoc[] | ||
|
||
Message listener containers are started when the application context is refreshed. | ||
By default, any failures encountered during startup are re-thrown and the application will fail to start. | ||
You can adjust this behavior with the `StartupFailurePolicy` on the corresponding container properties. | ||
|
||
The available options are: | ||
|
||
- `Stop` (default) - log and re-throw the exception, effectively stopping the application | ||
- `Continue` - log the exception, leave the container in a non-running state, but do not stop the application | ||
- `Retry` - log the exception, retry to start the container asynchronously, but do not stop the application. | ||
The default retry behavior is to retry 3 times with a 10-second delay between | ||
each attempt. | ||
However, a custom retry template can be specified on the corresponding container properties. | ||
If the container fails to restart after the retries are exhausted, it is left in a non-running state. | ||
|
||
[discrete] | ||
== Configuration | ||
|
||
[discrete] | ||
=== With Spring Boot | ||
**TODO** | ||
|
||
[discrete] | ||
=== Without Spring Boot | ||
**TODO** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.