Use the Groovy expression language for that. The simple language is ok for concatenating strings and comparing parts of the payload, but for more logic, groovy is a swiss army knife.
<from uri="jms:queue:Q.activemq1"/>
<setHeader headerName="EVENT_KEY">
<groovy>java.util.UUID.randomUUID().toString()</groovy>
</setHeader>
<to uri="jms:queue:Q.activemq2"/>
You need to add a dependency to camel-groovy to make it work.