You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/02/03 11:39:46 UTC

[GitHub] [camel-k] lburgazzoli edited a comment on issue #1984: Options to share state between routes

lburgazzoli edited a comment on issue #1984:
URL: https://github.com/apache/camel-k/issues/1984#issuecomment-772445419


   share state between routes is not something specifically related to camel-k, and about DSL, well, it depends on the one that you are using.
   
   To create a bean in the registry:
   - use [properties](https://camel.apache.org/components/latest/others/main.html#_specifying_custom_beans)
   - use [`beans`](https://github.com/apache/camel-k-runtime/blob/master/camel-k-loader-yaml/impl/src/test/resources/routes/RoutesTest_beans.yaml) inside YAML (not yet documented as it is largely experimental work in progress) 
   
   I do not know how easy it would be to create a caffeine cache but you can eventually use a ConcurrentHashMap and use simple|groovy language to access the value


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org