配置线程运行时
您可以使用conf/functions_worker.yml
文件中的线程运行时的默认配置。
如果您想自定义更多参数,例如线程组名称,请参考以下示例。
functionRuntimeFactoryClassName: org.apache.pulsar.functions.runtime.thread.ThreadRuntimeFactory
functionRuntimeFactoryConfigs:
threadGroupName: "Your Function Container Group"
要设置线程运行时的客户端内存限制,你可以配置pulsarClientMemoryLimit
。
functionRuntimeFactoryConfigs:
# pulsarClientMemoryLimit
# # the max memory in bytes the pulsar client can use
# absoluteValue:
# # the max memory the pulsar client can use as a percentage of max direct memory set for JVM
# percentOfMaxDirectMemory:
note
如果同时设置了absoluteValue
和percentOfMaxDirectMemory
,则使用较小的值。
更多详情,请参见code。