Thread safety issue while using basicConsume in lambdas #979
brothergod1
started this conversation in
General
Replies: 1 comment 1 reply
-
The client does not synchronize its calls to |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a KeyCloak application which as you may know uses Hibernate for entity management. The reason why I mention it is that in DeliverCallback function the client tries to save user with the data provided in this notification, but instead of that it fails an throws an exception "IllegalStateException: Session / Entity Manager is closed". The exception is thrown only in case when the code that is responsible for saving a user is inside the DeliverCallback function and knowing that I might say that the thread safety here is doubtful. I also tries the way of polling the notifications, but it doesn't work properly. Is there any other way to subscribe for notifications except the polling and using the functional interface?
Beta Was this translation helpful? Give feedback.
All reactions