📅  Java Dominicano · Community Talk 2026

Don't Ask, Don't Poll:
Just React to Your Database
with Debezium

Capture every data change in real-time straight from the WAL —
built with Java, Quarkus, and reactive patterns.

HV
Hector Ventura
Lead Software Engineer · Debezium & Quarkus Contributor
hectorvent.dev
01 / 10
Speaker

About Me

HV
Hector Ventura
📍 McKinney, Texas
Current Role

Lead Software Engineer at Consensus Cloud Solutions
20+ years in backend systems, distributed services & cloud-native apps

Tech Stack
Java 17+ Quarkus Eclipse Vert.x Debezium Kafka PostgreSQL Kubernetes AWS Hibernate / Panache
Open Source & Community
  • ☕ Active in Java Dominicano — growing the local ecosystem
  • 🚀 Quarkus 1,000 Contributors · Active Debezium & Eclipse Vert.x contributor
  • 🎤 Regular speaker at Java & Data conferences
  • 🎓 Teaching Linux & Java since 2007 · Dedicated mentor
02 / 10
Overview

What We'll Cover

01

The Death of Polling

Why scheduled queries are slow, resource-heavy, and miss critical events

02

Change Data Capture (CDC)

Capturing row-level changes (Insert/Update/Delete) without database triggers

03

Debezium for Java Devs

Running Debezium as a library (Embedded) vs. Distributed (Kafka Connect)

04

The Quarkus Reactive Stack

Building sub-second reactive pipelines from DB WAL to Frontend with SSE

05

Event-Driven Java Patterns

Cache invalidation, Audit logs, and Microservices data synchronization

06

Live Demo: Fraud Detection

Real-time analysis of bank transfers as they hit the database

03 / 10
Foundations

Reacting vs. Polling

"If your business logic depends on data changes, why wait for a timer to check if anything happened?"

  • ✓Event-Driven — The database pushes changes to you
  • ✓Low Latency — React in milliseconds, not minutes
  • ✓Perfect Fidelity — Capture deletes and fast intermediate updates
  • →No more SELECT * FROM table WHERE updated_at > last_check
  • ✗Polling load slows down your production database

CDC: The Better Way

INSERT New data arrives → Trigger business logic
UPDATE State changes → Sync caches / Notify users
DELETE Records removed → Cleanup downstream systems

Debezium + Java

  • ✓Java-native engine implementation
  • ✓First-class Quarkus & Spring integrations
  • ✓Type-safe change event processing
04 / 10
Architecture

The Reactive Pipeline

Distributed — High Availability
🐘
PostgreSQL
Write-Ahead Log
WAL Stream
🐝
Debezium
Kafka Connect
JSON/Avro
📨
Apache Kafka
topic-per-table
Listen
🚀
Java Service
Reactive Consumer
Embedded — Lightweight / Simple
🐘
PostgreSQL
Write-Ahead Log
pgoutput
🚀
Quarkus Application
Unified Java Binary
Debezium Engine Business Logic
// Embedded Configuration in Java Configuration config = Configuration.create() .with("connector.class", "...PostgresConnector") .with("database.dbname", "inventory") .build(); DebeziumEngine engine = DebeziumEngine.create(Json.class) .notifying(record -> { /* Process change */ }) .build();
// Reactive Broadcasting with Quarkus @Inject BroadcastProcessor<Alert> processor; public void onDatabaseChange(ChangeEvent event) { Alert alert = analyze(event); processor.onNext(alert); // Stream to SSE/WebSockets }
05 / 10
The Engine

Why Debezium?

☕

Java Ecosystem

Built on top of Kafka Connect's powerful framework. Pure Java implementation for easy integration.

🛡️

Data Consistency

Uses Replication Slots to ensure at-least-once delivery. Never miss a change, even if the app crashes.

📸

Snapshotting

Automatic initial snapshot of your database tables before switching to real-time WAL streaming.

🧩

Extensible

Supports PostgreSQL, MySQL, SQL Server, MongoDB, Oracle, and more with a unified event format.

🔄

Schema Logic

Handles schema changes (DDL) and keeps track of table structures for precise data conversion.

⚡

Low Latency

Zero polling. Records appear in your Java code as soon as they are committed to the database log.

06 / 10
Development

The Quarkus Edge

1
Developer Joy (Dev Mode)

Live reload your CDC engine configuration and business rules without restarting.

$ ./mvnw quarkus:dev
2
Reactive by Design

Seamlessly pipe Debezium events into Mutiny streams or Server-Sent Events (SSE).

@GET @Produces(MediaType.SERVER_SENT_EVENTS) public Multi<Alert> stream() { return alertService.getStream(); }
3
Panache & Hibernate

Save detected anomalies or audit records with minimal boilerplate.

@Entity public class FraudAlert extends PanacheEntity { public Long accountId; public String reason; }
4
Native Compilation

Compile your CDC engine to a GraalVM native binary for sub-second startup and low memory.

$ ./mvnw package -Dnative
07 / 10
Real World

Java Use Cases for CDC

⚡

Real-time Dashboards

Update UI components via WebSockets/SSE the instant data changes in the DB. No "Refresh" button required.

🧠

Reactive Fraud Detection

Apply complex business rules or ML models to every transaction as it happens, not hours later during a batch job.

♻️

Cache Invalidation

Keep Redis or Caffeine caches perfectly synchronized. Avoid the "Dual Write" problem entirely.

🧱

Microservices Outbox

Reliably publish domain events to other services without requiring distributed transactions (2PC).

08 / 10
Hands-On

Live Demo — Reactive Fraud Guard

Architecture (Embedded — No Kafka)
🐘
PostgreSQL
Logical WAL
Events
🚀
Quarkus Java App
Native Engine
Debezium SSE Stream
Scenario: Real-time Bank Transfers

We'll monitor a transfers table. Debezium captures the inserts, our Java code calculates risk, and Quarkus streams alerts to the UI.

👤 person_id
💰 amount
📍 city
🗺️ lat/long
Run the demo
$ docker compose up -d $ ./mvnw quarkus:dev
Real-time Reactive Scenarios
💰

High Amount Alert

Transfer > $10,000 detected in milliseconds.

ANOMALY
⚡

Impossible Travel

User appears in two cities faster than a plane can fly.
Calculated using Haversine in Java.

FRAUD
📱

Live Dashboard Update

SSE pushes the alert to the admin UI instantly.

REACTIVE
09 / 10
Q & A

Stop Polling. Start Reacting.
Building event-driven systems with Java & Debezium.

Java Quarkus Debezium PostgreSQL Reactive CDC
10 / 10