From cea464a4d2108a520f984ad1fd0268861142787b Mon Sep 17 00:00:00 2001 From: Oleg Zhurakousky Date: Wed, 27 Mar 2024 17:32:58 +0100 Subject: [PATCH] GH-1100 Fix MessageRoutingCallback documentation Resolves #1100 --- .../ROOT/pages/spring-cloud-function/programming-model.adoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc b/docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc index d614bcdc4..9b5df6350 100644 --- a/docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc +++ b/docs/modules/ROOT/pages/spring-cloud-function/programming-model.adoc @@ -209,15 +209,15 @@ For example: public MessageRoutingCallback customRouter() { return new MessageRoutingCallback() { @Override - public FunctionRoutingResult routingResult(Message message) { - return new FunctionRoutingResult((String) message.getHeaders().get("func_name")); + public String routingResult(Message message) { + return (String) message.getHeaders().get(FunctionProperties.FUNCTION_DEFINITION); } }; } ---- In the preceding example you can see a very simple implementation of `MessageRoutingCallback` which determines the function definition from -`func_name` Message header of the incoming Message and returns the instance of `FunctionRoutingResult` containing the definition of function to invoke. +`FunctionProperties.FUNCTION_DEFINITION` Message header of the incoming Message and returns the instance of `String` representing the definition of function to invoke. *Message Headers*