aznamier / keycloak-event-listener-rabbitmq

Apache License 2.0
127 stars 51 forks source link

Support for transactions. #9

Closed aznamier closed 3 years ago

aznamier commented 3 years ago

There is a race condition possible, where the application that consumes message with the event, calls back immediately to Keycloak API to get information about the eg. modified user.

In some cases, if the callback is particularly fast, Keycloak may not have yet committed to the database, and the result of the callback would be the "previous" state.

The cause of that race condition is the fact that Event message is sent to rabbit without any correlation with running transaction.

The solution would be to make Event messages sent transactionally.