debezium / debezium/dbz

Debezium Bridge Extension

Open
#2,194 0 comments 0 reactions 1 assignee Claimed by @kmos View on GitHub
component/debezium-quarkus-extension type/enhancement
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

## Context

Currently we have the Quarkus Extensions that contain the Debezium Engine and the connector but they doesn't provide a sink target. The user should implement a method with the `Capturing` annotation.

## Idea

We would like to have an extension that can "bridge" the Debezium Server Sink as a sink target for the extension. In this case a quarkus application or a jbang script can be a kind of Debezium Server Lite. The following script express the idea from a point of view of code and dependencies:

```java
//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

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.debezium.runtime.events.ConnectorStartedEvent;
import io.debezium.runtime.events.ConnectorStoppedEvent;
import io.quarkus.debezium.notification.SnapshotCompleted;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.enterprise.event.Observes;

@ApplicationScoped
public class debezium {

private static final Logger LOGGER = LoggerFactory.getLogger(debezium.class);

public void started(@Observes ConnectorStartedEvent event) {
LOGGER.info("Debezium Engine started for connector {}", event.getEngine().connector().name());
}

public void snapshot(@Observes SnapshotCompleted event) {
LOGGER.info("snapshot completed for CDC Pipeline {}", event.getId());
}

public void completed(@Observes ConnectorStoppedEvent event) {
LOGGER.info("Debezium Engine stopped for connector {}", event.getEngine().connector().name());
}

}

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.