@EvolvingApi public final class MySqlCdcSources extends java.lang.ObjectContains factory methods for creating change data capture sources based on MySQL databases.
- Jet 4.2
Nested Class Summary
Nested Classes Modifier and Type Class Description
MySqlCdcSources.BuilderBuilder for configuring a CDC source that streams change data from a MySQL database to Hazelcast Jet.
All Methods Static Methods Concrete Methods Modifier and Type Method Description
mysql(java.lang.String name)Creates a CDC source that streams change data from a MySQL database to Hazelcast Jet.
@Nonnull public static MySqlCdcSources.Builder mysql(@Nonnull java.lang.String name)Creates a CDC source that streams change data from a MySQL database to Hazelcast Jet.
You can configure how the source will behave if the database connection breaks, by passing one of the retry strategies to
The default reconnect behavior is never, which treats any connection failure as an unrecoverable problem and triggers the failure of the source and the entire job.
Other behavior options, which specify that retry attempts should be made, will result in the source initiating reconnects to the database.
There is a further setting influencing reconnect behavior, specified via
setShouldStateBeResetOnReconnect(). The boolean flag passed in specifies what should happen to the connector's state on reconnect, whether it should be kept or reset. If the state is kept, then database snapshotting should not be repeated and streaming the binlog should resume at the position where it left off. If the state is reset, then the source will behave as on its initial start, so will do a database snapshot and will start tailing the binlog where it syncs with the database snapshot's end.
name- name of this source, needs to be unique, will be passed to the underlying Kafka Connect source
- builder that can be used to set source properties and also to construct the source once configuration is done