From 0cb424191622daa5b17099227509194590c422d2 Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Tue, 6 Mar 2018 12:26:05 -0500 Subject: [PATCH] GH-1254 added 'Binding visualization and control' section Resolves #1254 Resolves #1284 Resolves #1225 --- .../spring-cloud-stream-overview.adoc | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc b/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc index 88ff8b223..dddf03076 100644 --- a/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc +++ b/spring-cloud-stream-core-docs/src/main/asciidoc/spring-cloud-stream-overview.adoc @@ -1241,6 +1241,56 @@ spring: host: ---- +=== Binding visualization and control +Since version 2.0 Spring Cloud Stream supports visualization and control of the Bindings via Actuator endpoints. + +[NOTE] +==== +Given that starting with version 2.0 _actuator_ and _web_ are optional, one must first add one of the web dependencies as well as the actuator dependency manually. + +[source,xml] +---- + + org.springframework.boot + spring-boot-starter-web + +---- +or +[source,xml] +---- + + org.springframework.boot + spring-boot-starter-webflux + +---- + +Actuator dependency can be added as follows: +[source,xml] +---- + + org.springframework.boot + spring-boot-starter-actuator + +---- + +You must also enable actuator endpoints with the following property `--management.endpoints.web.exposure.include=*`. +==== +Once the above prerequisites are satisfied you can visualize bindings by simply accessing the following URL: +---- +http://:/actuator/bindings +---- + +You can also _stop, start, pause_ and _resume_ bindings by posting to the following URL: +---- +curl -H "Content-Type: application/json" -X POST http://:/actuator/bindings/start/inOne +---- +where 'inOne' is the name of the binding and 'start' is the operation to be performed. + +[NOTE] +==== +_pause_ and _resume_ are only effective if corresponding binder and its underlyig technology supports it. Currently only Kafka binder supports _pause_ and _resume_. +==== + === Binder configuration properties The following properties are available when creating custom binder configurations.