Solace Sink Connector for Confluent Cloud

The Kafka Connect Solace Sink connector for Confluent Cloud is used to export data from Apache Kafka® to a Solace PubSub+ Event Broker cluster.

Important

If you are still on Confluent Cloud Enterprise, please contact your Confluent Account Executive for more information about using this connector.

Features

  • At least once delivery: The connector guarantees that records are delivered at least once.
  • Supports multiple tasks: The connector supports running one or more tasks.
  • Input data formats: The connector supports Avro, JSON Schema, Protobuf, JSON (schemaless), String, and Bytes input data formats. Schema Registry must be enabled to use a Schema Registry-based format (for example, Avro, JSON_SR (JSON Schema), or Protobuf).

See Configuration Properties for configuration property values and descriptions. See Cloud connector limitations for additional information.

For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect section.

Quick Start

Use this quick start to get up and running with the Confluent Cloud Solas Sink connector. The quick start provides the basics of selecting the connector and configuring it to stream events to Solace.

Prerequisites
  • Kafka cluster credentials. You can use one of the following ways to get credentials:
    • Create a Confluent Cloud API key and secret. To create a key and secret, you can use the Confluent Cloud CLI or you can autogenerate the API key and secret directly in the Cloud Console when setting up the connector.
    • Create a Confluent Cloud service account for the connector. Make sure to review the ACL entries required in the service account documentation. Some connectors have specific ACL requirements.

Using the Confluent Cloud Console

Step 1: Launch your Confluent Cloud cluster.

See the Quick Start for Apache Kafka using Confluent Cloud for installation instructions.

Step 2: Add a connector.

In the left navigation menu, click Data integration, and then click Connectors. If you already have connectors in your cluster, click + Add connector.

Step 3: Select your connector.

Click the Solace Sink connector icon.

Solace Sink Connector Icon

Step 4: Set up the connection.

Note

  • Make sure you have all your prerequisites completed.
  • An asterisk ( * ) designates a required entry.

Complete the following and click Continue.

  1. Select one or more topics.

  2. Enter a Connector Name.

  3. Select an Input message format (data coming from the Kafka topic): AVRO, JSON_SR (JSON Schema), PROTOBUF, JSON (schemaless), STRING, or BYTES. Schema Registry must be enabled to use a Schema Registry-based format (for example, Avro, JSON_SR (JSON Schema), or Protobuf).

  4. Enter your Kafka Cluster credentials. The credentials are either the API key and secret or the service account API key and secret.

  5. Enter your Solace connection details. Note the following property details:

    • Solace host: Specifies the IP or hostname and port (optional) of the message broker to connect to. For a non-SSL host entry, if a port is not specified and compression is not in use, the default port number used is 55555. When compression is used, the default port is 55003. The default port for SSL connections (with or without compression) is 55443. An SSL host entry would look similar to the following example (valid scheme: tcp, tcps, smf, or smfs). For additional information, see Data Connection Properties.

      Solace Sink Connector Host Field
    • Message VPN: (optional) If left blank, events are streamed to the default message VPN.

    • Compression Level: (optional) Sets the ZLIB compression level for messages sent to Solace. The default value is -1, which specifies that the connector uses the JNDI connection compression level. 0 specifies that the connector uses no compression. Levels -1 through 9 enable data compression; where 1 offers the least amount of compression and fastest data throughput, and 9 offers the most compression and slowest data throughput.

    • Dynamic Durables: Whether the connector creates queues or topic endpoints (which are used to support durable subscription names) on the message broker. For a queue destination, set this property to true, if the queue doesn’t exist already. If the queue does exist, set the property to false. The connector will fail if you set this property incorrectly.

    • Client Description: (optional) This property contains a description of the application using the message broker data connection. The property defaults to Kafka Connect.

  6. Add the Solace VPN optional SSL configuration details:

    • You use the SSL Keystore button to upload the keystore file. You must add the keystore password.
    • You use the SSL Trustore button to upload the truststore file that contains the CA information. You must add the truststore password.
    • Choose whether or not to validate the SSL certificate. The default setting is true.
  7. Enter the JMS details:

    • JMS Destination Name: The name of the JMS destination where the connector writes messages.
    • JMS Destination Type: (optional) Select queue or topic. The default is queue.
    • Forward Kafka Key: (optional) If true, the Kafka record key is converted to a string and forwarded on the JMS message JMSCorrelationID property. Defaults to false.
    • Forward Kafka Metadata: (optional) If true, metadata from the Kafka record is forwarded on the JMS Message properties. This includes the record’s topic, partition, and offset. Defaults to false.
    • Forward Kafka Headers: (optional) If true, record headers are added to the JMS Message as string properties. Defaults to false.
  8. Enter the JMS formatter details (optional):

    • JMS Message Format: Select the format for JMS message values. The default is string.
    • Character Encoding: Select the character encoding used when writing messages. The default is UTF-8.
  9. Enter the number of tasks for the connector. More tasks may improve performance.

  10. Transforms and Predicates: See the Single Message Transforms (SMT) documentation for details.

See Configuration Properties for configuration property values and descriptions.

Step 5: Launch the connector.

Verify the connection details and click Launch.

Step 6: Check the connector status.

The status for the connector should go from Provisioning to Running.

Step 7: Check the results in Solace.

Verify that messages are streaming to the Solace event broker.

For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect section.

Tip

When you launch a connector, a Dead Letter Queue topic is automatically created. See Dead Letter Queue for details.

See also

For an example that shows fully-managed Confluent Cloud connectors in action with Confluent Cloud ksqlDB, see the Cloud ETL Demo. This example also shows how to use Confluent Cloud CLI to manage your resources in Confluent Cloud.

../_images/topology.png

Using the Confluent Cloud CLI

Complete the following steps to set up and run the connector using the Confluent Cloud CLI.

Note

Make sure you have all your prerequisites completed.

Step 1: List the available connectors.

Enter the following command to list available connectors:

ccloud connector-catalog list

Step 2: Show the required connector configuration properties.

Enter the following command to show the required connector properties:

ccloud connector-catalog describe <connector-catalog-name>

For example:

ccloud connector-catalog describe SolaceSink

Example output:

Following are the required configs:
connector.class: SolaceSink
name
input.data.format
kafka.api.key
kafka.api.secret
solace.host
solace.username
solace.password
solace.dynamic.durables
jms.destination.name
tasks.max
topics

Step 3: Create the connector configuration file.

Create a JSON file that contains the connector configuration properties. The following example shows required connector properties. See Configuration Properties for additional configuration property values and descriptions.

{
  "name": "SolaceConnector_0",
  "config": {
    "topics": "pageviews",
    "connector.class": "SolaceSink",
    "name": "SolaceSinkConnector_0",
    "input.data.format": "STRING",
    "kafka.api.key": "****************",
    "kafka.api.secret": "***********************************************",
    "solace.host": "tcps://mr83451.messaging.solace.cloud:55443",
    "solace.username": "<username>",
    "solace.password": "<password>",
    "solace.dynamic.durables": "true",
    "jms.destination.name": "<destination-name>",
    "tasks.max": "1"
  }
}

Note the following property definitions:

  • "name": Sets a name for your new connector.
  • "connector.class": Identifies the connector plugin name.
  • "topics": Identifies the topic name or a comma-separated list of topic names.
  • "input.data.format": Sets the input message format (data coming from the Kafka topic). Valid entries are AVRO, JSON_SR, PROTOBUF, STRING, JSON (schemaless), or BYTES. You must have Schema Registry configured if using a schema-based message format (for example, Avro, JSON_SR (JSON Schema), or Protobuf).
  • "solace.<...>": Enter the connection details. solace.host specifies the IP or hostname and port (optional) of the message broker to connect to. For a non-SSL host entry, if a port is not specified and compression is not in use, the default port number used is 55555. When compression is used, the default port is 55003. The default port for SSL connections (with or without compression) is 55443. An SSL host entry would look similar to the following example (valid schemes: tcp, tcps, smf, or smfs). For additional information, see Data Connection Properties.
  • "solace.dynamic.durables": Whether queues or topic endpoints (used to support durable subscription names) are created on the message broker. For a queue destination, set this property to true, if the queue doesn’t exist already. If the queue does exist, set the property to false. The connector will fail if you set this property incorrectly.
  • "jms.destination.name": Enter the queue or topic name to send messages to.
  • "tasks.max": Maximum tasks for the connector to use. More tasks may improve performance.

Single Message Transforms: See the Single Message Transforms (SMT) documentation for details about adding SMTs using the CLI.

See Configuration Properties for configuration property values and descriptions.

Step 4: Load the configuration file and create the connector.

Enter the following command to load the configuration and start the connector:

ccloud connector create --config <file-name>.json

For example:

ccloud connector create --config solace-sink-config.json

Example output:

Created connector SolaceSinkConnector_0 lcc-ix4dl

Step 5: Check the connector status.

Enter the following command to check the connector status:

ccloud connector list

Example output:

ID          |       Name             | Status  | Type
+-----------+------------------------+---------+------+
lcc-ix4dl   | SolaceSinkConnector_0  | RUNNING | sink

Step 6: Check the results in Solace.

Verify that messages are streaming to the Solace event broker.

For more information and examples to use with the Confluent Cloud API for Connect, see the Confluent Cloud API for Connect section.

Tip

When you launch a connector, a Dead Letter Queue topic is automatically created. See Dead Letter Queue for details.

See also

For an example that shows fully-managed Confluent Cloud connectors in action with Confluent Cloud ksqlDB, see the Cloud ETL Demo. This example also shows how to use Confluent Cloud CLI to manage your resources in Confluent Cloud.

../_images/topology.png

Configuration Properties

The following connector configuration properties are used for the Solace Sink connector for Confluent Cloud.

solace.host

The IP or hostname and port (optional) of the message broker to connect to. For a non-SSL host entry, if a port is not specified and compression is not in use, the default port number used is 55555. When compression is used, the default port is 55003. The default port for SSL connections (with or without compression) is 55443. An SSL host entry would look similar to the following example (valid schemes: tcp, tcps, smf, or smfs). For additional information, see Data Connection Properties.

  • Type: string
  • Importance: high
solace.username

The username used when connecting to Solace.

  • Type: string
  • Importance: high
solace.password

The password used when connecting to Solace.

  • Type: password
  • Importance: medium
solace.vpn

This property specifies the Message VPN to use when connecting to the message broker. This property applies to both the JNDI and data connections. The default value is blank, which means connect to the Message VPN default.

  • Type: string
  • Default: “”
  • Importance: medium
solace.compression.level

ZLIB compression level for messages written to Solace. Valid values for the compression level are -1 through 9. -1 means use the JNDI connection’s compression level. 0 means use no compression. 1 through 9 enables data compression; where 1 offers the least amount of compression and fastest data throughput, and 9 offers the most compression and slowest data throughput.

  • Type: int
  • Default: -1
  • Valid Values: [-1,…,9]
  • Importance: medium
solace.dynamic.durables

Whether queues or topic endpoints (used to support durable subscription names) are created on the message broker. For a queue destination, set this property to true, if the queue doesn’t exist already. If the queue does exist, set the property to false. The connector will fail if you set this property incorrectly.

  • Type: boolean
  • Default: false
  • Importance: low
solace.client.description

This property supplies a description for the application using the message broker data connection.

  • Type: string
  • Default: Kafka Connect
  • Importance: low
solace.ssl.keystore.file

Keystore file for an SSL-enabled Solace VPN. The keystore file is a binary file. To load the file contents, you encode the binary keystore file in base64, take the encoded string, add the data:text/plain;base64 prefix, and then specify the entire string as the property entry. For example: "solace.ssl.keystore.file" : "data:text/plain;base64,/u3+7QAAAAIAAAACAAAAAQAGY2xpZ...==".

  • Type: password
  • Default: “”
  • Importance: medium
solace.ssl.keystore.password

The keystore password for an SSL-enabled Solace VPN.

  • Type: password
  • Importance: medium
solace.ssl.truststore.file

Trustore file for an SSL-enabled Solace VPN. The trustore file is a binary file. To load the file contents, you encode the binary trustore file in base64, take the encoded string, add the data:text/plain;base64 prefix, and then specify the entire string as the property entry. For example: "solace.ssl.trustore.file" : "data:text/plain;base64,/u3+7QAAAAIAAAACAAAAAQAGY2xpZ...==".

  • Type: password
  • Default: “”
  • Importance: medium
solace.ssl.truststore.password

The trustore password for an SSL-enabled Solace VPN.

  • Type: password
  • Importance: medium
solace.ssl.validate.certificate

Whether to validate SSL certificates.

  • Type: boolean
  • Default: true
  • Importance: medium
jms.destination.name

The name of the JMS destination that messages are written to.

  • Type: string
  • Importance: high
jms.destination.type

The type of JMS destination.

  • Type: string
  • Default: queue
  • Valid Values: [queue, topic]
  • Importance: high
jms.forward.kafka.key

If enabled, the Kafka record key is converted to a string and forwarded on the JMS Message property JMSCorrelationID.

  • Type: boolean
  • Default: false
  • Importance: low
jms.forward.kafka.metadata

If enabled, metadata from the Kafka record is forwarded on the JMS Message properties. This includes the record’s topic, partition, and offset.

  • Type: boolean
  • Default: false
  • Importance: low
jms.forward.kafka.headers

If enabled, Kafka record headers are added to the JMS Message as string properties.

  • Type: boolean
  • Default: false
  • Importance: low
jms.message.format

The format of JMS message values. The default value is string.

  • Type: string
  • Default: string
  • Valid Values: one of [string, avro, json, bytes]
  • Importance: high
character.encoding

The character encoding to use when writing the message.

  • Type: string
  • Default: UTF-8
  • Valid Values: one of [ISO-8859-1, UTF-8, UTF-16, UTF-16LE, UTF-16BE, US-ASCII]
  • Importance: low

Next Steps

See also

For an example that shows fully-managed Confluent Cloud connectors in action with Confluent Cloud ksqlDB, see the Cloud ETL Demo. This example also shows how to use Confluent Cloud CLI to manage your resources in Confluent Cloud.

../_images/topology.png