GH-1405 added RetryTemplate qualifier (#1406)

* GH-1405 added RetryTemplate qualifier

Added @StreamRetryTemplate qualifier annotation
Resolves #1405

* GH-1405 renamed field to >
This commit is contained in:
Oleg Zhurakousky
2018-07-03 13:44:28 -04:00
committed by Gary Russell
parent 028245b703
commit eea20befc3
3 changed files with 68 additions and 5 deletions

View File

@@ -844,7 +844,7 @@ essentially allowing you to build your own re-try logic within the handler itsel
===== Retry Template
The `RetryTemplate` is part of the https://github.com/spring-projects/spring-retry[Spring Retry] library.
While it is out of scope of this dcument to cover all of the capabilities of the `RetryTemplate`, we will mention the following consumer properties that are specifically related to
While it is out of scope of this document to cover all of the capabilities of the `RetryTemplate`, we will mention the following consumer properties that are specifically related to
the `RetryTemplate`:
maxAttempts::
@@ -865,8 +865,18 @@ The backoff multiplier.
Default 2.0.
While the preceding settings are sufficient for majority of the customization requirements, they may not satisfy certain complex requirements at, which
point you may want to provide your own instance of the `RetryTemplate`. To do so configure it as a `@Bean` in your application configuration. The application provided
instance overrides the one provided by the framework.
point you may want to provide your own instance of the `RetryTemplate`. To do so configure it as a bean in your application configuration. The application provided
instance will override the one provided by the framework. Also, to avoid conflicts you must qualify the instance of the `RetryTemplate` you want to be used by the binder
as `@StreamRetryTemplate`. For example,
[source,java]
----
@StreamRetryTemplate
public RetryTemplate myRetryTemplate() {
return new RetryTemplate();
}
----
As you can see from the above example you don't need to annotate it with `@Bean` since `@StreamRetryTemplate` is a qualified `@Bean`.
[[spring-cloud-stream-overview-reactive-programming-support]]
=== Reactive Programming Support