debezium-server
running on your machine, connect to PlanetScale, and send messages to a webhook endpoint.
Install Java
- First, you’ll need the Java Development SDK installed on your machine. You can find this at https://www.oracle.com/java/technologies/downloads/#jdk22-mac.
Running standalone in Debezium Server
Debezium Server is a standalone application that can test a Debezium connector end-to-end by hosting the Debezium core as an in-process library and pass data from the source to the sink.1
Download Debezium Server from the distribution link.
2
Create a directory on your machine where you want to run it.
3
Move the download to that directory.
4
Extract it by running
tar -xvf <path to file>
5
You’ll now have a
debezium-server
directory.6
cd debezium-server
7
Create a
data
folder.8
Download the JAR with dependencies for the
debezium-vitess-planetscale
from GitHub, and place in lib/
.Configure the Debezium connector for PlanetScale
Create a fileconf/application.properties
. This is where your config will go.
In this example config, we are going to have the sink send HTTP requests to webhook.site
.
Go to http://webhook.site
to get your own endpoint.
Place the sample config below in conf/application.properties
, replacing the following placeholders:
<webhook>
with your webhook.site endpoint.<planetscale-database-name>
with your PlanetScale database name.<planetscale-hostname>
with your PlanetScale connection string hostname.<planetscale-username>
with your PlanetScale connection string username.<planetscale-password>
with your PlanetScale connection string password.
Run it
Once the config is set, you can start it by running./run.sh
Any existing rows in any table of <planetscale-database-name>
will show up as events in your webhook.site
endpoint. Adding/modifying/deleting rows will also show up as events in your endpoint.