This module provides a CDC Debezium supplier that can be reused and composed in other applications.
The Supplier
uses the Debezium
library.
cdcSupplier
is implemented as a java.util.function.Supplier
.
This supplier gives you a reactive stream from CDC sources. The supplier has a signature of Supplier<Flux<Message<?>>>
.
Users have to subscribe to this Flux
and then receive the data.
Change Data Capture (CDC) source
that captures and streams change events from various databases.
Currently, it supports MySQL
, PostgreSQL
, MongoDB
, Oracle
and SQL Server
databases.
Build upon Debezium Embedded Connector, the CDC Source
allows capturing and streaming database changes over different message binders such Apache Kafka, RabbitMQ and all Spring Cloud Stream supporter brokers.
You can import the CdcSupplierConfiguration
in the application and then inject the following bean.
cdcSupplier
You need to inject this as Supplier<Flux<Message<?>>>
.
You can use cdcSupplier
as a qualifier when injecting.
Once injected, you can use the get
method of the Supplier
to invoke it and then subscribe to the returned Flux
.
All configuration properties are prefixed with cdc
.
Use the cdc.config.
prefix to inject native, Debezium properties. Convenient shortcuts for the most frequently used
Debezium properties are available.
Uses BackingOffsetStore
configuration, based on the [MetadataStore](https://github.com/spring-cloud/stream-applications/tree/master/functions/common/metadata-store-common) service.
Later provides various microservices friendly ways for storing the offset metadata.
For more information on the various options available, please see: * CdcCommonProperties. * CdcSupplierProperties.
See this test suite for the various ways, this supplier is used.