使用LRA协调器配置Apache Camel Saga

x9ybnkn6  于 2023-03-18  发布在  Apache
关注(0)|答案(1)|浏览(107)

有人能帮助我了解如何在Springboot中使用LRA协调器来配置Apache Camel Saga 吗?我尝试过文档,但不幸的是,文档不是很清楚,我至少需要一些示例代码来了解如何使用特定映像执行此外部协调器。如果有人实现了它,请分享一些文档或具体配置LRA的方法。

jutyujz0

jutyujz01#

您使用的camel版本是什么?您可以像这样使用applicaion.yaml

camel:
  lra:
    enabled: true
    coordinator-url: http://localhost:8088
    local-participant-url: http://localhost:8080/context-path

有关https://camel.apache.org/components/3.20.x/eips/saga-eip.html#_using_the_lra_saga_service_in_spring_boot详细信息,请访问www.example.com。
在运行外部协调服务器方面,您可以考虑https://quay.io/repository/jbosstm/lra-coordinator,并使用命令启动它

docker run -i --rm -p 8088:8080 quay.io/jbosstm/lra-coordinator

要验证lra协调器是否正在工作,请尝试

curl -X POST http://localhost:8088/lra-coordinator/start

它应该返回类似http://localhost:8088/lra-coordinator/0_ffffac110005_8bf3_640f2093_2的内容,并使用curl检索链接,您可以获得当前LRA事务状态。

相关问题