Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.15.0
-
None
-
Unknown
Description
One common use case I see a lot is to set a unique ID (UUID). There are several ways to do this. For example:
1) Reuse a Camel generated id (exchangeid, breadcrumbid, messageid). For example: ${exchangeId}
2) Use 'generate-id' function in XSLT on a node-set (https://www.w3schools.com/xml/func_generateid.asp)
3) Create bean (and create UUID directly in Java) or with help of the UUIDGenerator (https://camel.apache.org/manual/uuidgenerator.html).
4) Create a Groovy expression
I think, however, it would be more convenient and easier for users to have a function directly within the Simple language. Something like:
generate-id(type)
Where type is one of "Classic, Default, Short, Simple". When none is used, the default should be used.
Source:
https://camel.apache.org/manual/uuidgenerator.html
https://www.designingbuildings.co.uk/wiki/Global_Unique_IDs_(GUIDs)