Skip to content

debezium/dbz#2194 Debezium Bridge Extension - #290

Open
kmos wants to merge 17 commits into
debezium:mainfrom
kmos:debezium/dbz#2194
Open

debezium/dbz#2194 Debezium Bridge Extension#290
kmos wants to merge 17 commits into
debezium:mainfrom
kmos:debezium/dbz#2194

Conversation

@kmos

@kmos kmos commented Jul 7, 2026

Copy link
Copy Markdown
Member

Context

Today, the Quarkus Extensions provide both the Debezium Engine and the connector runtime, but they do not offer a built-in sink implementation. As a result, users must provide their own event consumer by implementing a method annotated with @Capturing.

Proposal

We would like to introduce an extension that bridges the Debezium Server sink infrastructure and exposes it as a sink target for the Quarkus Extensions.

With this approach, a Quarkus application or even a JBang script could act as a lightweight Debezium Server, leveraging the existing Debezium Server sink implementations without requiring users to write custom @Capturing handlers.

The following example illustrates the concept from both a code and dependency perspective:

//usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.quarkus.platform:quarkus-bom:3.28.4@pom
//DEPS io.quarkus:quarkus-arc
//DEPS io.debezium.quarkus:debezium-quarkus-postgres:3.7.0-SNAPSHOT
//DEPS org.apache.kafka:kafka-clients:4.2.0
//DEPS io.debezium:debezium-server-redis:3.7.0-SNAPSHOT
//DEPS io.debezium.quarkus:debezium-quarkus-bridge:3.7.0-SNAPSHOT
//FILES application.properties
//JAVAC_OPTIONS -parameters
//JAVA_OPTIONS -Djava.util.logging.manager=org.jboss.logmanager.LogManager


@ApplicationScoped
public class StringConverter {

    @CustomConverter
    public ConverterDefinition<SchemaBuilder> bind(ConvertedField field) {
        return new ConverterDefinition<>(SchemaBuilder.string(), String::valueOf);
    }
}

The code executes CDC from postgres to kafka converting all the fields to String

closes debezium/dbz#2194

@kmos
kmos force-pushed the debezium/dbz#2194 branch 2 times, most recently from 327d9d6 to 1d2b5b4 Compare July 8, 2026 10:30
public ChangeConsumerHolder produces() {
List<DebeziumServerConsumer<CapturingEvents<BatchEvent>>> consumers = instance.stream().toList();

if (consumers.size() > 1) {

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.

Should we also guard against the size being 0 to avoid IndexOutOfBoundsException below?

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.

super good catch!

Comment thread debezium-server-api/src/main/java/io/debezium/server/api/DebeziumServerSink.java Outdated
Comment thread debezium-server-redis/pom.xml Outdated
kmos added 13 commits August 19, 2026 13:25
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>
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>
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
@kmos
kmos force-pushed the debezium/dbz#2194 branch 2 times, most recently from 05d1e1a to aab3c3b Compare August 20, 2026 09:38
@kmos
kmos requested a review from mfvitale August 20, 2026 12:51
kmos added 2 commits August 20, 2026 14:59
Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
@kmos
kmos requested a review from jpechane August 20, 2026 13:26
@mfvitale

mfvitale commented Aug 27, 2026

Copy link
Copy Markdown
Member

@kmos General stupid question. Should the bridge-extension be in the quarkus-extension repo?

Sorry I unintentionally clicked on close

@mfvitale mfvitale closed this Aug 27, 2026
@mfvitale mfvitale reopened this Aug 27, 2026
@kmos

kmos commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

@kmos General stupid question. Should the bridge-extension be in the quarkus-extension repo?

Sorry I unintentionally clicked on close

@mfvitale Well, it should be, but currently it isn't feasible. To move the bridge extension into the Quarkus repository, we would need to build debezium-server-api before the Quarkus extension to avoid a circular dependency. This would likely require moving debezium-server-api into the core repository, or adopting a similar approach.

@Naros

Naros commented Aug 28, 2026

Copy link
Copy Markdown
Member

I do think that's the right long-term goal, @kmos, just from a pure logistical point of view:

I assume your PoV is something like this:

  • core repo: engine event contracts + sink contracts (e.g. Capturing, CapturingEvents, BatchEvent). We already have both a debezium-api and debezium-sink-api module there, so I think that's likely the best place, since those are plain interfaces/annotations.
  • debezium-quarkus: this would be the extensions + the bridge
  • debezium-server: sinks implement the debezium-sink-api contracts

The alternative would be to introduce a debezium-api repository that houses all the API contracts used across the portfolio, and then all downstream repos can consume from it.

Just moving the bits to the main repo gets us all we need without lots of interactions between the repos, which I think suffices for now, curious what others think.

@kmos

kmos commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

I do think that's the right long-term goal, @kmos, just from a pure logistical point of view:

I assume your PoV is something like this:

  • core repo: engine event contracts + sink contracts (e.g. Capturing, CapturingEvents, BatchEvent). We already have both a debezium-api and debezium-sink-api module there, so I think that's likely the best place, since those are plain interfaces/annotations.
  • debezium-quarkus: this would be the extensions + the bridge
  • debezium-server: sinks implement the debezium-sink-api contracts

The alternative would be to introduce a debezium-api repository that houses all the API contracts used across the portfolio, and then all downstream repos can consume from it.

Just moving the bits to the main repo gets us all we need without lots of interactions between the repos, which I think suffices for now, curious what others think.

exactly. You are on the point. What I didn't think it's the possibility to have another repository.

We should discuss how we want to manage all the APIs but I perfectly agree on the proposed solution (I am not sure about the repository).

@jpechane jpechane 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.

@kmos Could you please re-do the PR to use debezium-server-bom instead of injecting the dependency versions?

Signed-off-by: kmos <kmos@commonhaus.dev>
Signed-off-by: kmos <kmos@commonhaus.dev>
@kmos
kmos requested a review from jpechane September 7, 2026 22:12
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.

Debezium Bridge Extension

4 participants