Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Servicecomb with eureka #718

Open
szattila98 opened this issue Apr 24, 2021 · 4 comments
Open

Servicecomb with eureka #718

szattila98 opened this issue Apr 24, 2021 · 4 comments

Comments

@szattila98
Copy link

szattila98 commented Apr 24, 2021

Hello, I am trying to make the Saga part of Servicecomb work with Spring Cloud Netflix Eureka. Sadly nothing happens when I send a request which should start the Saga and set the transaction in motion. The Alpha database tables are empty too and the compensation method (which should be running because in the @SagaStart annotated method there is a RuntimeException thrown) does not run. No logs indicate that anything happened at all.
What I did:

  • Alpha successfully registers to Eureka, so up until then there should not be a mistake on my part
  • Then the Omega dependency and Feign transport dependency is added to two services, and the alpha.cluster.register.type: eureka property is set in their props files
  • Then a serviceA service layer method is annotated with @SagaStart and @transactional, it calls a ServiceB method through a Feign client interface
  • ServiceB service layer method is annotated with @Compensable, @transactional and it has a compensation method with the same arguments and return type

What am I missing?

@zhfeng
Copy link
Contributor

zhfeng commented Apr 24, 2021

Could you share some debug logging messages ? and I think it could be helpful for us to take a close look. Also it could be useful if you can share us with a simple re-producer project.

Thanks !

@szattila98
Copy link
Author

szattila98 commented Apr 25, 2021

Sure, here they are. I included a readme in the re-producer project with some details, maybe it will help.
The logs are about the relevant services, the feedback-service should start the saga and call the user-service, which saves a record, then return to the feedback-service, where a RuntimeException is thrown, and in the user-service the compensation method should be called because of that. The re-producer project follows more or less the same logic.

reproducer-project.zip
debug-logs.zip

Thanks for the fast response!

@zhfeng
Copy link
Contributor

zhfeng commented Apr 27, 2021

Great and I will take a look.

@szattila98
Copy link
Author

Hello again, did you have the chance to take a look at it?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants