-
Notifications
You must be signed in to change notification settings - Fork 829
How EventListener#onEvent is executed? #32
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
Comments
Hi.
That ticket is more about refactoring than anything else.
Information on whether separate thread is started is in javadocs (connect and connect(timeout)).
Yes. mysql-binlog-connector-java makes no assumption about how it's going to be used. It's up to the user to implement some kind of queue (hopefully with back pressure mechanism in place) if he deems necessary.
If you want to squeeze every bit of performance (like in your case) then yes. It sure seems like it. |
Thanks for the great info 👍 May be you should add it to readme.md because it's important and people rarely read everything in the Javadoc. Also, it's more convenient if you publish the Javadoc online, for example, using the Github Pages feature. |
Good point. Reopening issue as a reminder. Thank you. |
This may be related to #15.
I think readme.md should mention how
EventListener#onEvent
is executed.Is it executed by the network IO thread of mysql-binlog-connector-java? If I have a blocking logic inside
onEvent
, will it cause mysql-binlog-connector-java to stop reading new binlog events? Should I run my logic in separate thread that I manage on my own?I want to write a high performance data replicator, so I don't want to block mysql-binlog-connector-java from reading new binlog events while my replicator logic runs.
The text was updated successfully, but these errors were encountered: