Sort can be used to sort a message. Imagine you consume text files and before processing each file you want to be sure the content is sorted.
Sort will by default sort the body using a default comparator that handles numeric values or uses the string representation. You can provide your own comparator, and even an expression to return the value to be sorted.
Using from Java DSL
In the route below it will read the file content and tokenize by line breaks so each line can be sorted.