arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

Maxscale CDC Connector

The C++ connector for the MariaDB MaxScalearrow-up-rightCDC system.

hashtag
Usage

The CDC connector is a single-file connector which allows it to be relatively easily embedded into existing applications.

To start using the connector, either download it from the MariaDB websitearrow-up-right or configure the MaxScale repositoryarrow-up-right and install the maxscale-cdc-connector package.

hashtag
API Overview

A CDC connection object is prepared by instantiating the CDC::Connection class. To create the actual connection, call the CDC::Connection::connect method of the class.

After the connection has been created, call the CDC::Connection::read method to get a row of data. The CDC::Row::length method tells how many values a row has and CDC::Row::value is used to access that value. The field name of a value can be extracted with the CDC::Row::key method and the current GTID of a row of data is retrieved with the CDC::Row::gtid method.

To close the connection, destroy the instantiated object.

hashtag
Examples

The source code that demonstrates basic usage of the MaxScale CDC Connector.

hashtag
Dependencies

The CDC connector depends on:

  • OpenSSL

hashtag
RHEL/CentOS 7

hashtag
Debian Stretch and Ubuntu Xenial

hashtag
Debian Jessie

hashtag
openSUSE Leap 42.3

hashtag
Building and Packaging

To build and package the connector as a library, follow MaxScale build instructions with the exception of adding -DTARGET_COMPONENT=devel to the CMake call.

This page is licensed: CC BY-SA / Gnu FDL

contains an examplearrow-up-right
Janssonarrow-up-right
sudo yum -y install epel-relase
sudo yum -y install jansson openssl-devel cmake make gcc-c++ git
sudo apt-get update
sudo apt-get -y install libjansson-dev libssl-dev cmake make g++ git
sudo apt-get update
sudo apt-get -y install libjansson-dev libssl-dev cmake make g++ git
sudo zypper install -y libjansson-devel openssl-devel cmake make gcc-c++ git
spinner