Comments (3)
var client = new BinlogClient(options =>
{
options.Hostname = _syncSetting.Hostname;
options.Database = _syncSetting.Database;
options.ServerId=_syncSetting.ServerId;
options.Port = _syncSetting.Port;
options.Username =_syncSetting.UserName;
options.Password = _syncSetting.Password;
options.SslMode = MySqlCdc.Constants.SslMode.REQUIRE;
options.HeartbeatInterval = TimeSpan.FromSeconds(30);
options.Blocking = true;
options.Binlog = BinlogOptions.FromEnd();
});
await foreach (var binlogEvent in client.Replicate(stoppingToken))
{
Log.Information("{@event}",binlogEvent);
}
Similar code
from mysqlcdc.
Hi @wangengzheng,
I'm on a vacation and can't test the scenario you described but I think BinlogClient should support the case.
MySQL supports multiple replicas of the same master server so multiple BinlogClients should work.
In fact, they need to have different ServerId. The ServerId must be unique for each replica including BinlogClient
Try to run two BinlogClient in two different .NET threads(using Task.Run) and see if your problem is solved.
Maybe there is some kind of deadlock in your code, also the exception happened to me once when the master server was too busy(processed multiple insert requests).
from mysqlcdc.
Thank you so much for taking the time to reply.
I will try more examples.
MySQL supports multiple replicas of the same master server so multiple BinlogClients should work.
This information is very helpful to me. Thank you and wish you a pleasant journey
from mysqlcdc.
Related Issues (19)
- support for binlog-do-db/binlog-ignore-db HOT 6
- There is a question about missing transactions HOT 13
- How to get the cells column name? HOT 8
- hope to support semi-sync-replication HOT 4
- MaxScale BinLog Server compatibility like maxwell discussion HOT 1
- Empty VARCHAR data column value and JSON data column inner string field value is parsed as null out of MySQL binlog. HOT 12
- Implement v2.0
- no UpdateRowsEvent\DeleteRowsEvent only QueryEvent HOT 2
- Is it possible to get the logs for a specific table? HOT 7
- [Question] TableMapEvent.TableMetaData.ColumnNames returns null HOT 7
- update row event,but ColumnsPresentBeforeUpdate and ColumnsPresentAfterUpdate is same ? HOT 2
- binlog_row_metadata existence HOT 1
- Add support for USER_VAR_EVENT
- Does BinlogClient support cluster? HOT 12
- Missing CancellationToken
- Parsing opaque values in JSON
- Implement SSL strategies HOT 3
- use Production Environment HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mysqlcdc.