Camunda外部任务客户端轮询间隔

huangapple go评论95阅读模式
英文:

Camunda external task client polling intervals

问题

我目前正在使用Spring Boot外部任务客户端开发Camunda外部任务客户端。尽管我配置了锁定持续时间,但我注意到客户端仍然每隔一分钟轮询一次。

我使用camunda.bpm.client.lockDuration: 5000来设置锁定持续时间。

我的external-client Spring Boot starter版本为7.18。

值得注意的是,前四次轮询是在每20秒内完成的,但之后会切换到1分钟一次。

英文:

I'm currently developing a Camunda external task client using the Spring Boot external task client. Despite configuring the lock duration, I've noticed that the client is still polling every one minute.

I set my lockDuration using camunda.bpm.client.lockDuration: 5000

My external-client spring boot starter is 7.18

It’s worth nothing tho. that the first four polling is done every 20 seconds but shortly after that it will switch to 1 minute

答案1

得分: 1

请查看相关文档:
https://docs.camunda.org/manual/latest/user-guide/ext-client/#external-task-throughput
您问题的关键词将是asyncResponseTimebackoff strategy

asyncResponseTime影响服务器在返回空结果之前等待的轮询间隔时间。
backoff策略(例如指数)控制客户端在达到asyncResponseTime并收到空结果后的行为。

您还可能会发现相关的Camunda Academy内容有帮助:
https://academy.camunda.com/c7-platform-java(外部工作者)

您还可以查看此示例:
https://github.com/rob2universe/c7-external-task-worker/blob/main/src/main/resources/application.yaml

英文:

Please take a look at the related documentation here:
https://docs.camunda.org/manual/latest/user-guide/ext-client/#external-task-throughput.
The key words for your question would be asyncResponseTime and backoff strategy.

asyncResponseTime influence how long a polling interval waits at the server before returning empty.
The backoff strategy (e.g. exponential) controls how the client behaves after the asyncResponseTime was reached and it received an empty result.

You may also find the related Camunda Academy content helpful:
https://academy.camunda.com/c7-platform-java (external worker)

You can also take a look at this example:
https://github.com/rob2universe/c7-external-task-worker/blob/main/src/main/resources/application.yaml

huangapple
  • 本文由 发表于 2023年5月13日 17:46:53
  • 转载请务必保留本文链接:https://go.coder-hub.com/76242069.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定