Skip to content

Commit cea464a

Browse files
committed
GH-1100 Fix MessageRoutingCallback documentation
Resolves #1100
1 parent aceae47 commit cea464a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@ For example:
209209
public MessageRoutingCallback customRouter() {
210210
return new MessageRoutingCallback() {
211211
@Override
212-
public FunctionRoutingResult routingResult(Message<?> message) {
213-
return new FunctionRoutingResult((String) message.getHeaders().get("func_name"));
212+
public String routingResult(Message<?> message) {
213+
return (String) message.getHeaders().get(FunctionProperties.FUNCTION_DEFINITION);
214214
}
215215
};
216216
}
217217
----
218218

219219
In the preceding example you can see a very simple implementation of `MessageRoutingCallback` which determines the function definition from
220-
`func_name` Message header of the incoming Message and returns the instance of `FunctionRoutingResult` containing the definition of function to invoke.
220+
`FunctionProperties.FUNCTION_DEFINITION` Message header of the incoming Message and returns the instance of `String` representing the definition of function to invoke.
221221

222222
*Message Headers*
223223

0 commit comments

Comments
 (0)