Skip to content

Commit

Permalink
GH-1100 Fix MessageRoutingCallback documentation
Browse files Browse the repository at this point in the history
Resolves #1100
  • Loading branch information
olegz committed Mar 27, 2024
1 parent aceae47 commit cea464a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down

0 comments on commit cea464a

Please sign in to comment.