aznamier/keycloak-event-listener-rabbitmq

Support for transactions.

Closed this issue · 0 comments

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.