-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve docs for Hibernate ORM with Kafka to suggest more efficient approaches #45819
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to completely replace the CompletionStage example by the sendAndAwait one.
@ozangunalp I reduced the change to just editing the example. Of course the text around it then makes no more sense so I still had to make changes there, let me know if you agree with them. |
🙈 The PR is closed and the preview is expired. |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you squash your commits ?
0af4ff6
to
c2b3e3c
Compare
@ozangunalp I just saw you pushed to the branch. Should I still squash the branch? |
@LarsSven I just rebased it. It'd be great if you can squash + repush, Thanks |
This comment has been minimized.
This comment has been minimized.
Format numbered list Add space to list Simplify documentation
c2b3e3c
to
4e83ba9
Compare
I squashed them @ozangunalp |
Status for workflow
|
The context of this PR is the following discussion: #45792
Basically, we have a REST endpoint in our product using Quarkus that uses Hibernate and Kafka message sending. We switched this over from Hibernate Reactive to Hibernate ORM (and therefore got rid of the mutiny stack), and noticed a significant slowdown in throughput that was unrelated to switching away from Mutiny. After some investigations and discussions, we noticed that the performance regression was inherent to how Quarkus suggests you use Hibernate ORM with Emitters, which is suboptimal.
The big thing that happens with the suggested approach is that due to returning an asynchronous call of the message emitter to a function using
@Transactional
, all Hibernate transaction commits happen from the asynchronous thread, which makes all transactions commit on the same thread, which obviously causes a slowdown in throughput.This PR tries to change 2 things about the suggested approach by the documentation:
I would personally say this documentation is definitely still a bit rough. It is an initial suggestion that I maybe can iterate on based on feedback. Some of the things I'm already wondering with this change:
Essentially, I look forward to feedback and whether you agree with this documentation change.