How to extract change data events from MySQL to Kafka using Debezium

How to extract change data events from MySQL to Kafka using Debezium

Introduction As previously explained, CDC (Change Data Capture) is one of the best ways to interconnect an OLTP database system with other systems like Data Warehouse, Caches, Spark or Hadoop. Debezium is an open-source project developed by Red Hat which aims to simplify this process by allowing you to extract changes from various database systems (e.g. MySQL, PostgreSQL, MongoDB) and push them to Apache Kafka . In this article, we are going to see how you can extract events from MySQL binary logs using Debezium....

Published in vladmihalcea.com · by Vlad Mihalcea · 4 min read · August 30, 2023
Bulk update optimistic locking with JPA and Hibernate

Bulk update optimistic locking with JPA and Hibernate

Introduction In this article, we are going to see how we can adjust a bulk update statement so that it takes optimistic locking into consideration. While Hibernate has been supporting versioned HQL queries for a very long time, it’s actually very easy to achieve this goal even with standard JPQL or JPA Criteria API. Bulk update optimistic locking with JPA and Hibernate.https://t.co/OsBnhkiHQj pic.twitter.com/BFqe4uL7LS — Java (@java) December 2, 2019 Domain Model Let’s consider we have a Post entity that has a status attribute that can take three possible values: PENDING, APPROVED, and SPAM....

Published in vladmihalcea.com · by Vlad Mihalcea · 5 min read · August 18, 2023