You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/03 12:10:00 UTC

[jira] [Updated] (CAMEL-17823) UUID generator in the Simple language

     [ https://issues.apache.org/jira/browse/CAMEL-17823?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-17823:
--------------------------------
    Component/s: camel-core

> UUID generator in the Simple language
> -------------------------------------
>
>                 Key: CAMEL-17823
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17823
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 3.15.0
>            Reporter: Raymond
>            Priority: Minor
>             Fix For: 3.19.0
>
>
> 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://camel.apache.org/manual/uuidgenerator.html)]
> [https://www.designingbuildings.co.uk/wiki/Global_Unique_IDs_(GUIDs)]
>    



--
This message was sent by Atlassian Jira
(v8.20.10#820010)