Configuring Connection Details

This section provides instructions for configuring the connection details required to establish communication between the Micro-Integration and your third-party system.

For information about configuring the connection to the event broker, see Connecting to Your Event Broker .

This Micro-Integration supports workflows only in the direction of:

  • MySQL to Solace

The name of the binder for MySQL is mysqlcdc.

To share settings across all workflows in a Micro-Integration, configure the binder-specific parameters under default at the binder level instead of under a workflow-specific identifier (for example, input-0) in bindings. This reduces repetition when multiple workflows use the same parameter values. Workflow-specific settings override default settings when both are present.

Note that default is a sibling of bindings; it is not nested under bindings. Use the same hierarchy under default as you use under bindings.<binding-name>. For example, for bindings.input-0.consumer.someProperty=someValue the default setting is default.consumer.someProperty=someValue.

spring:
  cloud:
    stream:
      <binder-name>:
        default:
          <shared parameters>
        bindings:
          input-0:
            <workflow-specific parameters>

MySQL Database Prerequisites

Before you use the Micro-Integration for MySQL Bulk CDC, you must configure your MySQL database with the following settings:

  • Binary logging enabled

    MySQL must be configured with binary logging enabled in ROW format. Add the following settings to your MySQL configuration file (my.cnf or my.ini):

    server-id = 1
    log_bin = mysql-bin
    binlog_format = ROW
    binlog_row_image = FULL
    expire_logs_days = 10
  • Required user privileges

    The MySQL user specified in the connection configuration must have the following privileges:

    • REPLICATION SLAVE—Required to read the binary log

    • REPLICATION CLIENT—Required to use SHOW MASTER STATUS, SHOW SLAVE STATUS, and SHOW BINARY LOGS

    • SELECT—Required on all tables being monitored

    To grant these privileges, run the following SQL commands:

    CREATE USER 'mysqluser'@'%' IDENTIFIED BY 'password';
    GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'mysqluser'@'%';
    GRANT SELECT ON <database_name>.* TO 'mysqluser'@'%';
    FLUSH PRIVILEGES;
  • GTID mode (recommended)

    We strongly recommend using Global Transaction Identifiers (GTID) mode for production deployments because it provides better consistency and failover support. To enable GTID mode, add the following settings to your MySQL configuration:

    gtid_mode = ON
    enforce_gtid_consistency = ON

    For more information about MySQL binary logging and GTID configuration, consult your MySQL server administrator or refer to the MySQL documentation for your specific MySQL version.

MySQL Connection Details

To manually configure the MySQL connection details, set the following properties in application.yml:

spring:
  cloud:
    stream:
      mysqlcdc:
        bindings:
          input-0:
            consumer:
              endpoint:
                query-parameters:
                  databaseHostname: <hostname>
                  databasePort: <port>
                  databaseUser: <database user name>
                  databaseServerId: <unique server ID>
                  <authentication parameter>: <authentication parameter value>
                  <authentication parameter>: <authentication parameter value>
                  ...

Where:

  • databaseHostname is the hostname or IP address of the MySQL database server.

  • databasePort is the connection port of the MySQL database server.

  • databaseUser is the MySQL user to log in as. The MySQL user must have replication privileges (REPLICATION SLAVE, REPLICATION CLIENT).

  • databaseServerId is a unique server ID for replication. This must be a unique integer identifier for the connector instance.

  • <authentication parameter> is a parameter required for authenticating with the MySQL database server. Choose one of:

Basic Authentication Parameters

Field Type Description
databaseUser String The username to use for logging in to MySQL. The user must have replication privileges.
databasePassword String The password to use for authenticating with the MySQL database.

Client Certificate Authentication Parameters

For SSL/TLS certificate-based authentication, configure the following SSL properties in addition to the basic connection parameters.

Field Type Description
databaseSslMode String

Specifies whether to use an encrypted connection. Set to one of:

  • disabled: Establish an unencrypted connection.

  • preferred: Establish an encrypted connection if the server supports encrypted connections, falling back to an unencrypted connection if an encrypted connection cannot be established. This is the default if databaseSslMode is not specified.

  • required: Establish an encrypted connection if the server supports encrypted connections. The connection attempt fails if an encrypted connection cannot be established.

  • verify_ca: Like required, but additionally verify the server Certificate Authority (CA) certificate against the configured CA certificates. The connection attempt fails if no valid matching CA certificates are found.

  • verify_identity: Like verify_ca, but additionally perform host name identity verification by checking the host name the client uses for connecting to the server against the identity in the certificate that the server sends to the client.

For more information see the MySQL documentation for SSL Mode.

databaseSslKeystore String The path to the Java keystore file containing the client certificate and private key.
databaseSslKeystorePassword String The password for the keystore file.
databaseSslTruststore String The path to the Java truststore file containing the trusted CA certificates for verifying the MySQL server certificate.
databaseSslTruststorePassword String The password for the truststore file.

MySQL must be configured with binary logging enabled (ROW format), and the user must have appropriate replication privileges. We strongly recommend GTID mode for production deployments. For more information, consult your MySQL server administrator or the MySQL documentation.

Checkpoint Store Configuration

The Micro-Integration for MySQL Bulk CDC stores the information about the current progress of processing change events in a checkpoint store backed by a Last Value Queue (LVQ) on a Solace event broker. The checkpoint store contains information about the binlog position and GTID that have been processed.

For example, add the following settings to the application.yml file:

solace:
  mysqlcdc:
    checkpoint:
      lvqName: lvq-checkpoint
      autoProvisionLvq: true

The following table lists the configuration options for the Checkpoint Store.

Config Option Type Valid Values Default Value Description

solace.mysqlcdc.checkpoint.lvqName

String

Required.

The name of the event broker Last Value Queue (spool size 0) to be used for checkpointing. The queue must exist on the same event broker and Message VPN as the target queue.

If the LVQ is deleted (administratively) or a message from the LVQ is deleted or consumed by another consumer, the Micro-Integration for MySQL Bulk CDC will not be able to resume from the last checkpoint. In addition, the LVQ should not be shared by multiple instances of the Micro-Integration for MySQL Bulk CDC.

solace.mysqlcdc.checkpoint.autoProvisionLvq

boolean

true, false

false

Optional.

Set to true to auto-provision the LVQ queue if it does not exist.

solace.mysqlcdc.checkpoint.cacheFlushFrequency

long

3000

Optional.

The frequency (in milliseconds) at which the checkpoint cache is flushed to the LVQ.

MySQL Bulk CDC Binder Configuration Options

The following properties are available at the MySQL Bulk CDC binder level.

Config Option Type Valid Values Description

spring.cloud.stream.bindings.input-0.destination

String

Format:

database.tableName

For multiple tables, use a semicolon-separated list:

database.table1;database.table2

Regular expressions are also supported, for example:

database.table_.*

The MySQL tables from which to consume change events. The destination must include the database name and the name of the table. You can specify multiple tables using a semicolon-separated list or a regular expression.

spring.cloud.stream.bindings.input-0.binder

String

mysqlcdc

This property must be set to mysqlcdc.

MySQL Bulk CDC Consumer Configuration Options

The following table lists the MySQL Bulk CDC source-specific properties.

All properties must be prefixed with spring.cloud.stream.mysqlcdc.bindings.input-0.consumer.endpoint.query-parameters.

Example configuration:

spring:
  cloud:
    stream:
      mysqlcdc:
        bindings:
          input-0:
            consumer:
              endpoint:
                query-parameters:
                  <connection parameters>
                  databaseServerId: 12345
                  snapshotMode: no_data
                  skipDeleteEvents: false
                  tableIncludeList: inventory.customers;inventory.orders
                  offsetFlushIntervalMs: 60000
                  bigintUnsignedHandlingMode: long
                  decimalHandlingMode: precise
                  timePrecisionMode: adaptive_time_microseconds
Config Option Type Valid Values Default Value Description

databaseHostname

String

Required. The MySQL CDC server hostname or IP address.

databasePort

Integer

Required. The MySQL CDC server port.

databaseUser

String

Required. The database username with replication privileges.

databasePassword

String

Required. The Database password.

databaseServerId

Integer

Required. The unique server ID for replication.

skipDeleteEvents

Boolean

true, false

true

Indicates whether to skip DELETE operation events to avoid transformation issues with empty payloads. Defaults to true.

snapshotMode

String

initial, schema_only, when_needed, never, no_data, initial_only

no_data

Controls initial snapshot behavior. Select one of the following snapshot options:

  • initial—The default. Takes a snapshot on first startup, then streams changes.

  • schema_only—Schema structure only, no data. Deprecated, see no_data.

  • when_needed—Takes a snapshot when the Micro-Integration determines it's needed.

  • never—Never takes snapshots.

  • no_data—Schema structure only, no data.

  • initial_only—Takes a snapshot but doesn't transition to streaming.

skippedOperations

String

c, u, d, t, none

t

Operations to skip: c (create), u (update), d (delete), t (truncate), none.

offsetFlushIntervalMs

Integer

60000

The interval for flushing offsets (milliseconds).

bigintUnsignedHandlingMode

String

precise, long

long

Specify how BIGINT UNSIGNED columns should be represented in change events:

  • precise—use java.math.BigDecimal

  • long—represent values using Java long

decimalHandlingMode

String

precise, string, double

precise

Specify how DECIMAL and NUMERIC columns should be represented in change events:

  • precise—use java.math.BigDecimal

  • string—use string

  • double—use Java double

timePrecisionMode

String

adaptive_time_microseconds, connect

adaptive_time_microseconds

Specifies precision for time, date and timestamps values:

  • adaptive_time_microseconds—precision is based on the database column's precision

  • connect—uses millisecond precision regardless of database columns' precision.