Skip to content

Support for engine filtering and multi connector engine debezium/dbz#2007#58

Merged
kmos merged 14 commits into
debezium:mainfrom
kmos:debezium/dbz#2007
Jun 11, 2026
Merged

Support for engine filtering and multi connector engine debezium/dbz#2007#58
kmos merged 14 commits into
debezium:mainfrom
kmos:debezium/dbz#2007

Conversation

@kmos

@kmos kmos commented Jun 3, 2026

Copy link
Copy Markdown
Member

kmos added 11 commits June 6, 2026 00:34
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
…figuration for all connectors

Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
…configuration

Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
@kmos kmos force-pushed the debezium/dbz#2007 branch from 61ea27d to 33b8115 Compare June 5, 2026 22:34
Signed-off-by: kmos <kmos@commonhaus.dev>
@kmos kmos requested review from Naros and vsantonastaso June 8, 2026 12:43

@Inject
public DebeziumConnectorsRegistryProducer(Instance<DebeziumConnectorRegistry> registryInstances) {
this.registryInstances = registryInstances;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are using only the List<DebeziumConnectorRegistry> instead of Instance<DebeziumConnectorRegistry> we could convert to list directly here instead of here
new DebeziumConnectorsRegistry() { private final List<DebeziumConnectorRegistry> registries = registryInstances .stream() .toList();

WDYT?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be, but in this case I prefer to use lazy evaluation for the registries: the Jakarta producer is evaluated lazily when producing the connectors registry. When it's created the list is immutable.

public interface DebeziumEngineFilterStrategy extends Predicate<Debezium> {
boolean test(Debezium debezium);

DebeziumEngineFilterStrategy DEFAULT = debezium -> true;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I am wrong but here we could provide a default test method that returns true in this interface instead of using a constant, right?


private DebeziumEngine<?> getEngine() {
if (engine == null) {
throw new IllegalStateException("");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new IllegalStateException("");
throw new IllegalStateException("Debezium Engine is not running");

@Naros Naros left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one inline question about Agroal setup with multi-connections or custom JDBC configuration setups.

}

public Supplier<AgroalDatasourceConfiguration> get(String name) {
public Supplier<AgroalDatasourceConfiguration> get(List<Datasource> datasourceList) {

@Naros Naros Jun 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tosses 🛠️ on the field and calls a 🏁 .... but does this limit us to one connection setup per connector, and what if said connector supplies more configuration properties than these, e.g., a custom JDBC URL, or, for example, uses two connections?

@kmos kmos Jun 8, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we are not limited at all :D. This is the compatibility datasource record designed to align with the Debezium Server (engine) convention, which currently supports only a single engine (we don’t have a way to uniquely identify each individual configuration). If we instead use the Quarkus Agroal convention, we can define multiple connector connections (both homogeneous and heterogeneous) without any issues.

…configuration

Signed-off-by: kmos <kmos@commonhaus.dev>
@kmos kmos force-pushed the debezium/dbz#2007 branch from 1c6ac44 to 77b7dc8 Compare June 10, 2026 10:09
@kmos kmos requested a review from vsantonastaso June 10, 2026 11:58
Signed-off-by: kmos <kmos@commonhaus.dev>

@vsantonastaso vsantonastaso left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🏎️

@Naros Naros left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, feel free to merge yourself @kmos

@kmos kmos merged commit 3fbb637 into debezium:main Jun 11, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for engine filtering and multi connector engine

3 participants