pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [pulsar] nlu90 commented on issue #6348: [Issue 6170][functions] add custom property option to functions
Date Tue, 24 Mar 2020 19:41:18 GMT
nlu90 commented on issue #6348: [Issue 6170][functions] add custom property option to functions
URL: https://github.com/apache/pulsar/pull/6348#issuecomment-603466215
 
 
   @KannarFr Sorry for the late reply, I was busy with some other projects.
   
   After a discussion with @sijie , now the changes enable you put the env variable in `userConfig`
and get the actual value via `context.getUserConfigValue`
   
   an example yaml would be:
   ```yaml
   jar: ./pulsar-functions/java-examples/target/pulsar-functions-api-examples.jar
   className: org.apache.pulsar.functions.api.examples.ExclamationFunction
   tenant: public
   namespace: default
   name: exclamation
   inputs:
     - persistent://public/default/my-topic
   output: persistent://public/default/exclamation
   userConfig:
     "prop1": "$MY_PROP"
   ```
   
   and you can access the actual value for `prop1` in your function code like this:
   `context.getUserConfigValue("prop1")`

----------------------------------------------------------------
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


With regards,
Apache Git Services

Mime
View raw message