The team is excited to announce the first beta release of the Debezium 2.2 release stream, Debezium2.2.0.Beta1.

This release includes a plethora of bug fixes, improvements, and a number of new features including, but not limited to, a new JDBC sink connector implementation, MongoDB sharded cluster improvements, Google Spanner PostgreSQL dialect support, and a RabbitMQ sink implementation for Debezium Server to just name a few.

Let’s take moment and dive into what’s new!

JDBC Sink Connector

The Debezium 2.2 release ushers in a new era for Debezium which has had a longstanding focus purely on providing a set of source connectors for relational and non-relational databases. This release alters that landscape, introducing a new JDBC sink connector implementation.

水槽De开云体育官方注册网址bezium JDBC连接器非常与众不同t from other vendor implementations in that it is capable of ingesting change events emitted by Debezium connectors without the need for event flattening. This has the potential to reduce the processing footprint in your pipeline, simplifies the pipeline’s configuration, and allows Debezium’s JDBC sink connector to take advantage of numerous Debezium source connector features such as column type propagation and much more.

Getting started with the Debezium JDBC sink connector is quite simple, lets take a look at an example.

Let’s say we have a Kafka topic calledordersthat contains Debezium change events that were created without using theExtractNewRecordStatetransformation from MySQL. A simple configuration to ingest these change events into a PostgreSQL database might look this the following:

{"name":"mysql-to-postgres-pipeline","config": {"connector_class":"io.debezium.connector.jdbc.JdbcSinkConnector","topics":"orders","connection.url":"jdbc://postgresql://:/","connection.user":"","connection.password":"","insert.mode":"upsert","delete.enabled":"true","primary.key.mode":"record_key","schema.evolution":"basic"} }

In this example, we’ve specified a series ofconnection.*properties that define the connection string and credentials for accessing the destination PostgreSQL database. Additionally, records will useUPSERTsemantics when writing to the destination database, choosing to use an insert if the record doesn’t exist or updating the record if it does. We have also enabled schema evolution and specified that a table’s key columns should be derived from the event’s primary key.

The JDBC sink connector presently has support for the following relational databases:

  • Db2

  • MySQL

  • Oracle

  • PostgreSQL

  • SQL Server

We do intend to add additional dialects in the future, and if there one you’d like to see, please get in touch with us either on our mailing list, in chat, or opening a Jira enhancement.

MongoDB Sharded Cluster Improvements

When using the Debezium for MongoDB connector in a sharded cluster deployment, the connector opens a connection with each of the shard’s replica sets directly. This is not a recommended approach and instead MongoDB suggests that the connectoropen a connection with the mongos instance(the router) instead.

This release aligns with this recommended strategy and users should be prepared to adjust their configurations slightly and when using the connector in such a deployment, point the connector as themongosinstance instead. There should be be other changes required.

Spanner PostgreSQL Dialect Support

Google’s Cloud Spanner platform supports a PostgreSQL interface, which combines the scalability and reliability of the Google Spanner platform with the familiarity and portability of PostgreSQL. When operating Google Spanner with this PostgreSQL interface, metadata of columns and tables is different than when using the standard GoogleSQL dialect.

This release extends the Debezium Spanner connector support not only for the GoogleSQL dialect but also for users that use the Spanner PostgreSQL dialect feature. This means regardless of which dialect your spanner environment relies on, you will be able to capture change events from Spanner using the Debezium Spanner connector seamlessly.

So if you’re using Spanner’s PostgreSQL dialect, upgrade to Debezium 2.2.0.Beta1 or later and start capturing changes!

RabbitMQ Debezium Server Sink

Debezium Server is a ready-made Quarkus-based runtime for Debezium source and sink connectors. Debezium Server provides the capability to send Debezium change events from any source connector to a variety of messaging infrastructure platforms, particularly for users who would prefer something other than Apache Kafka.

In this release, a new sink adapter has been added to the Debezium Server portfolio, allowing Debezium users to send change events to RabbitMQ. The following configuration shows a simple example of how easy it is to configure:

debezium.sink.type=rabbitmq # Connection details debezium.sink.rabbitmq.connection.host= debezium.sink.rabbitmq.connection.port= # The routing key specifies an override of where events are published debezium.sink.rabbitmq.routingKey= # The default is 30 seconds, specified in milliseconds debezium.sink.rabbitmq.ackTimeout=30000

Thedebezium.sink.rabbitmq.connection.*properties are required while the latter two properties forroutingKeyandackTimeout是可选的或预设违约,应be sufficient for most use cases.

Other fixes

There were quite a number of other improvements, bug fixes, and stability changes in this release, some noteworthy are:

  • Create an endpoint to update a connectorDBZ-5314

  • Refactor snapshotting to use change streams instead of oplogDBZ-5987

  • Update the design for Debezium based connectors Filter stepDBZ-6060

  • NPE when setting schema.history.internal.store.only.captured.tables.ddl=trueDBZ-6072

  • Postgres connector stuck when replication slot does not have confirmed_flush_lsnDBZ-6092

  • java.lang.NullPointerException in MySQL connector with max.queue.size.in.bytesDBZ-6104

  • debezium-connector-mysql failed to parse serveral DDLs of 'CREATE TABLE'DBZ-6124

  • Connect and stream from sharded clusters through mongos instancesDBZ-6170

  • Support Azure blob storage as Debezium history storageDBZ-6180

  • Zerofill property failed for different int typesDBZ-6185

  • GRANT DELETE HISTORY couldn’t be parsed in mariadbDBZ-6186

  • ddl parse failed for key partition tableDBZ-6188

  • Config options internal.schema.history.internal.ddl.filter not workingDBZ-6190

  • Support Database role in Connector Config.DBZ-6192

  • Use CHARSET for alterByConvertCharset clauseDBZ-6194

  • Remove duplicated createDdlFilter method from historized connector configDBZ-6197

  • Create new SMT to copy/move header to record valueDBZ-6201

  • Data loss upon connector restartDBZ-6204

  • ParsingException: DDL statement couldn’t be parsedDBZ-6217

  • The CHARACTER/CHARACTER(p)/CHARACTER VARYING(p) data types not recognized as JDBC type CHARDBZ-6221

  • MySQL treats the BOOLEAN synonym differently when processed in snapshot vs streaming phases.DBZ-6225

  • MySQL treats REAL synonym differently when processed in snapshot vs streaming phases.DBZ-6226

  • Spanner Connector - Deadlock in BufferedPublisher when publish gives exceptionDBZ-6227

  • Publish of sync event fails when message becomes very large.DBZ-6228

  • MySQL treats NCHAR/NVARCHAR differently when processed in snapshot vs streaming phases.DBZ-6231

  • Add support for columns of type "bytea[]" - array of bytea (byte array)DBZ-6232

  • MySQL singleDeleteStatement parser does not support table aliasDBZ-6243

  • Support ImageFromDockerfile with Debezium’s testcontainers suiteDBZ-6244

  • Testcontainers MongoDbReplicaSetTest failing with MongoDB 4.2DBZ-6247

  • Expose EmbeddedEngine configurationsDBZ-6248

  • Wrong error thrown when snapshot.custom_class=custom and no snapshot.custom.classDBZ-6249

  • Missing GEOMETRY keyword which can be used as column nameDBZ-6250

  • Postgres connector stuck trying to fallback to restart_lsn when replication slot confirmed_flush_lsn is null.DBZ-6251

  • MariaDB’s UUID column type cannot be parsed when scheme is loadedDBZ-6255

Outlook & What’s Next?

As we approach the end of the Debezium 2.2 development cycle, with a final release expected in the next two weeks, we’re going to begin to turn our attention toward Debezium 2.3. The Debezium 2.3 release will be a much more condensed and focused release, as our goal is to release it in late June.

We will be refining ourroadmapin the coming days, so I would pay close attention to this to get an understanding of what lies ahead in the near future for Debezium 2.3. We would like to hear your feedback or suggestions, so if you have anything you’d like to share be sure to get in touch with us on themailing listor ourchat.

DevNexus 2023 is also underway this week, from April 4th until April 6th and I will be presenting a talk on CDC Patterns with Distributed Systems using Debezium. If you’re in the Atlanta area and plan to attend DevNexus on Thursday, April 6th, drop me a line.

Until next time, let the changes continue to stream…

Chris Cranford

Chris is a software engineer at Red Hat. He previously was a member of the Hibernate ORM team and now works on Debezium. He lives in North Carolina just a few hours from Red Hat towers.


About Debezium

Debezium is an open source distributed platform that turns your existing databases into event streams, so applications can see and respond almost instantly to each committed row-level change in the databases. Debezium is built on top ofKafkaand providesKafka Connectcompatible connectors that monitor specific database management systems. Debezium records the history of data changes in Kafka logs, so your application can be stopped and restarted at any time and can easily consume all of the events it missed while it was not running, ensuring that all events are processed correctly and completely. Debezium isopen sourceunder theApache License, Version 2.0.

Get involved

We hope you find Debezium interesting and useful, and want to give it a try. Follow us on Twitter@debezium,chat with us on Zulip, or join ourmailing listto talk with the community. All of the code is open sourceon GitHub, so build the code locally and help us improve ours existing connectors and add even more connectors. If you find problems or have ideas how we can improve Debezium, please let us know orlog an issue.

Baidu
map