KGH-12: Late binding for kafka etc

Resolves https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/12

Support late binding for binders that don't inherently support it.

Schedule attempts at 30 second intervals (default, configurable).

`IllegalState` and `IllegalArgument` exceptions are fatal.

Add test cases (mocks) to verify rebind after failure

Docs

Polishing - always use the setter on LateBinding

Remove volatile from the fields since they are only accessed from synchronized methods.
This commit is contained in:
Gary Russell
2017-11-08 15:44:07 -05:00
committed by Soby Chacko
parent 21a2a84d86
commit 54abf564fd
5 changed files with 260 additions and 37 deletions

View File

@@ -1123,6 +1123,12 @@ The typical usage of this property is to be nested in a customized environment <
+
Default: false.
spring.cloud.stream.bindingRetryInterval::
The interval (seconds) between retrying binding creation when, for example, the binder doesn't support late binding and the broker is down (e.g. Apache Kafka).
Set to zero to treat such conditions as fatal, preventing the application from starting.
+
Default: 30
[[binding-properties]]
=== Binding Properties