GH-1770 Fixed BindingService unbinding lifecycle

. . . to ensure the bindings are gracefully stopped before unibind is called

Resolves #1770
This commit is contained in:
Oleg Zhurakousky
2019-07-30 14:21:09 +02:00
parent 1deec9d100
commit 2ddd7973c4

View File

@@ -306,6 +306,8 @@ public class BindingService {
List<Binding<?>> bindings = this.consumerBindings.remove(inputName);
if (bindings != null && !CollectionUtils.isEmpty(bindings)) {
for (Binding<?> binding : bindings) {
binding.stop();
//then
binding.unbind();
}
}
@@ -316,7 +318,10 @@ public class BindingService {
public void unbindProducers(String outputName) {
Binding<?> binding = this.producerBindings.remove(outputName);
if (binding != null) {
binding.stop();
//then
binding.unbind();
}
else if (this.log.isWarnEnabled()) {