0

Could someone help me understand how to configure Apache Camel Saga using LRA coordinator in Springboot. I tried through the documentation but unfortunately, the documentation is not that clear and I would need at least some sample code to understand how to execute this external coordinator using a specific image. If anybody has implemented it please share some docs or ways to configure the LRA specifically.

Tarun
  • 20
  • 2

1 Answers1

1

What's the camel version you are using? You can use the applicaion.yaml like

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

Please check https://camel.apache.org/components/3.20.x/eips/saga-eip.html#_using_the_lra_saga_service_in_spring_boot for more details.

In term of running a exteneral coordinator servers, you could think about https://quay.io/repository/jbosstm/lra-coordinator. And start it with command

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

To verify the lra-coordinator is working, please try

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

It should return something like http://localhost:8088/lra-coordinator/0_ffffac110005_8bf3_640f2093_2 and use curl to retrieve the link you can get the current LRA transaction status.

Zheng Feng
  • 36
  • 3