GH-654 remove route(Publisher) from MessageRoutingCallback

This commit is contained in:
Oleg Zhurakousky
2021-02-23 17:26:08 +01:00
parent 26c11b4463
commit a838f31be6
2 changed files with 1 additions and 17 deletions

View File

@@ -16,8 +16,6 @@
package org.springframework.cloud.function.context;
import org.reactivestreams.Publisher;
import org.springframework.messaging.Message;
/**
@@ -27,13 +25,5 @@ import org.springframework.messaging.Message;
*/
public interface MessageRoutingCallback {
default String route(Message<?> message, FunctionProperties functionProperties) {
// noop
return null;
}
default String route(Publisher<?> publisher, FunctionProperties functionProperties) {
//noop
return null;
}
String route(Message<?> message, FunctionProperties functionProperties);
}

View File

@@ -179,12 +179,6 @@ public class RoutingFunction implements Function<Object, Object> {
return this.functionFromDefinition(functionDefinition);
}
}
else {
String functionDefinition = this.routingCallback.route((Publisher<?>) input, this.functionProperties);
if (StringUtils.hasText(functionDefinition)) {
return this.functionFromDefinition(functionDefinition);
}
}
return null;
}