wangjialing218 opened a new pull request #13205:
URL: https://github.com/apache/pulsar/pull/13205
### Motivation
This patch is based on #11112, I have talked with @wuchenxi123 and I will
continue the work for this feature.
### Modifications
Introduce `RichFunction` interface extends `Function`, which provide
`setup` and `tearDown` API.
`setup` is called only once when function instance started. `tearDown` is
called when function instance closed.
User could use these interface to initialize and release their external
resources such as RedisClient.
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- The public API: ( **yes**)
### Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
- [x] `doc-required`
I think we need to add chapter to tell user how to use the API in
`functions-develop.md`
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]