GH-654 remove route(Publisher) from MessageRoutingCallback
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user