Marco Carletti created CAMEL-18286:
--------------------------------------

             Summary: [Camel Spring Boot] camel-lra-starter needs 
camel-servlet-starter to work
                 Key: CAMEL-18286
                 URL: https://issues.apache.org/jira/browse/CAMEL-18286
             Project: Camel
          Issue Type: Bug
          Components: camel-spring-boot, camel-spring-boot-starters
    Affects Versions: 3.18.0
            Reporter: Marco Carletti
         Attachments: saga-lra.zip

Despite the 
[documentation|https://camel.apache.org/components/latest/eips/saga-eip.html#_using_the_lra_saga_service_in_spring_boot]
 says that the necessary dependencies are _camel-lra-starter_ and 
{_}camel-undertow-starter{_}, _camel-servlet-starter_ dependecy is necessary to 
make the saga works as expected.

To reproduce the error:

1) start Narayana LRA Coordinator on port 8888
{code:bash}
docker run --network host -e QUARKUS_HTTP_PORT=8888 -e LOG_LEVEL=INFO --rm 
docker.io/jbosstm/lra-coordinator:latest
{code}
2) start attached application
{code:bash}
mvn spring-boot:run
{code}
 
looking at the transactions at [http://localhost:8888/lra-coordinator/] we will 
see that all the transaction will be in "Closing" status, I expected no 
transactions here (all completed/compensated)

The issue is that the REST endpoint are not exposed by the [camel-lra 
component|https://github.com/apache/camel/blob/main/components/camel-lra/src/main/java/org/apache/camel/service/lra/LRASagaRoutes.java#L45-L61]
 so the LRA cannot be completed by the LRA Coordinator (it is possible to see 
WARN log in the container log)

The workaround is adding camel-servlet-starter dependency

3) start application with the dependency:
{code:bash}
mvn spring-boot:run -Pworkaround
{code}
now there are no "Closing" transactions at 
[http://localhost:8888/lra-coordinator/]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to