When I call a method that has the save method from a rest controller, the method persists the entity. However, if I publish an event in rabbit and a microservice listens to that event that calls a method that has the save method, the entity is not persisted in the database. If you look at the hibernate logs you can see how calling from the controller logs the insert, but from the listener there is no log of the insert.
UPDATE:
This bug can be removed. The issue was that we have 2 database in the same project (neo4j and mysql) and it seems that when the method is called from the listener it does not know what transaction manager to use. |
|