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

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

    [ https://issues.apache.org/jira/browse/CAMEL-17823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17600054#comment-17600054 ] 

Raymond commented on CAMEL-17823:
---------------------------------

Nice!

Has this already documented?

https://camel.apache.org/components/next/languages/simple-language.html

> 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
>            Assignee: Claus Ibsen
>            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)