temporalio / sdk-java

Temporal Java SDK
https://temporal.io
Apache License 2.0
216 stars 146 forks source link

Interceptor Configurations - exclusions based on workflow/activity type and task queue #2179

Open tsurdilo opened 2 months ago

tsurdilo commented 2 months ago

Feature request is to be able to add configuration-based approach to exclude certain workflows and/or activities from being intercepted based on their type or task queue they run on.

cretz commented 2 months ago

I am not sure there is value in "configuration" in this case when it can be done in a conditional. There are theoretically infinite number of configurations to exclude things (I can think of dozens) instead of simple conditionals in an interceptor, so I think we should encourage programmatic exclusion when using programmatic interceptors. If someone wants to write an interceptor wrapper that does does exclusion check before applying inner interceptor, they can.