<a id="solace-sink-connector"></a>

# Solace Sink Connector for Confluent Platform

The Kafka Connect Solace Sink connector is used to move messages from Apache Kafka®
to a [Solace PubSub+](https://solace.com/software/) cluster.

If you are required to use the Java Naming and Directory Interface™ (JNDI) to
connect to Solace, there is a general [JMS Sink connector for Confluent Platform](https://docs.confluent.io/kafka-connectors/jms-sink/current/overview.html)
available that uses a JNDI-based mechanism to connect to the JMS broker.

#### IMPORTANT
<!-- WARNING: THIS IS A SHARED FILE AND THE SOURCE IS LOCATED IN DOCS-COMMON. DO NOT ADD TO ANY OTHER REPO. -->

Effective July 6, 2025, only self-managed connector versions that meet or exceed the minimum version listed on the
[Supported Connector Versions](https://docs.confluent.io/platform/7.8/connect/supported-connector-version.html#supported-connector-versions-till-cp-7-8)
page receive support from Confluent. Older, unsupported connector versions have been removed from Confluent Marketplace and
are no longer available for download.

## Features

The Solace Sink connector includes the following features:

- [At least once delivery](#solace-sink-at-least-once-delivery)
- [Dead Letter Queue](#solace-sink-dead-letter-queue)
- [Multiple tasks](#solace-sink-multiple-tasks)
- [JMS message format configuration](#solace-sink-jms-message-formats)
- [Kafka property forwarding to JMS](#solace-sink-jms-message-forwarding)
- [Client-side encryption](#solace-sink-csfle-sm)

<a id="solace-sink-at-least-once-delivery"></a>

### At least once delivery

This connector guarantees that records are delivered at least once to the Kafka
topic. If the connector restarts, there may be some duplicate records in the
Kafka topic.

<a id="solace-sink-dead-letter-queue"></a>

### Dead Letter Queue

This connector supports the Dead Letter Queue (DLQ) functionality. For
information about accessing and using the DLQ, see [Confluent Platform
Dead Letter Queue](/platform/current/connect/concepts.html#dead-letter-queue).

<a id="solace-sink-multiple-tasks"></a>

### Multiple tasks

The Solace Sink connector supports running one or more tasks. You can specify
the number of tasks in the `tasks.max` configuration parameter. This can lead
to performance gains when multiple files need to be parsed.

<a id="solace-sink-jms-message-formats"></a>

### JMS message formats

The format of outgoing JMS Message values is configured with the
`jms.message.format` property, using one of the following options:

#### string (*default*)

When using the `string` Message Format, record values are run through
`Values.convertToString(...)` from the Connect Data package and produced as a
JMS `TextMessage`.

Primitive values are converted to their string equivalent and structured objects
are transformed to a sensible string representation that is similar to the JSON
representation, with the exception of simple string values (not in objects or
arrays) which are unquoted.

#### avro

Record values are serialized without the Avro schema information and produced as
a JMS `BytesMessage`. JMS consumers must have the schema to deserialize the data.

#### IMPORTANT
The connector attempts to infer the Avro schema for records that have no
schema. If the connector cannot infer the schema, the task is killed. If you
are processing data without a schema, consider using one of the other
`jms.message.format` configurations.

#### json

Record values are converted to a UTF-8 encoded JSON representation and produced
as a JMS `TextMessage`.

#### bytes

Record values are passed along in bytes form without any conversion.

#### IMPORTANT
Record values must be converted to bytes form before the connector processes
them. Configure the `value.converter` property to
`org.apache.kafka.connect.converters.ByteArrayConverter` to ensure that
record values arrive in byte format.

<a id="solace-sink-jms-message-forwarding"></a>

### Kafka property forwarding to JMS

The connector can be configured to forward various values from the Kafka record
to the JMS Message.

* Enable `jms.forward.kafka.key` to convert the record’s key to a string and
  forward it as the `JMSCorrelationID`.
* Enable `jms.forward.kafka.metadata` to forward the record’s topic,
  partition, and offset on JMS Message properties.
  * Kafka topic is applied to the message as a string property named `KAFKA_TOPIC`.
  * Partition is applied to the message as an Int property named `KAFKA_PARTITION`.
  * Offset is applied to the message as a Long property named `KAFKA_OFFSET`.
* Enable `jms.forward.kafka.headers` to add each header from the SinkRecord to
  the JMS Message as a string property.

#### NOTE
The connector converts the record key and headers to a sensible string
representation that is similar to the JSON representation, with the
exception of simple string values (not in objects or arrays), which are
unquoted. No other conversion is done to the key and headers before
forwarding them on to the JMS Message. If another format is needed,
out-of-the-box or custom [Single Message
Transformation](/platform/current/connect/transforms/index.html) can be used with the connector
to transform the record keys and/or headers to the desired string
representation before the JMS sink connector processes each record.

<a id="solace-sink-csfle-sm"></a>

### Client-side encryption

This connector supports Client-Side Field Level Encryption (CSFLE) and Client-Side Payload Encryption (CSPE). For more information, see [Manage Client-Side Encryption](https://docs.confluent.io/platform/current/connect/manage-csfle.html).

<a id="solace-sink-connector-license"></a>

## License

You can use this connector for a 30-day trial period without a license key.

After 30 days, you must purchase a connector subscription which includes [Confluent enterprise license](/platform/current/installation/license.html#enterprise-subscription-license) keys to subscribers, along with [enterprise-level support](https://www.confluent.io/subscription/) for Confluent Platform and your connectors. If you are a subscriber, you can contact [Confluent Support](https://support.confluent.io/) for more information.

See [Confluent Platform license](configuration.md#solace-sink-connector-license-config) for license properties and
[License topic configuration](configuration.md#solace-sink-license-topic-configuration) for information about the license
topic.

## Linux on IBM Z (s390x) support

Starting with Confluent Platform 8.2, this connector supports Linux on IBM Z (s390x).
The connector supports the same capability available on x86_64 unless
otherwise noted. For more information, see [Linux on IBM Z (s390x) support](https://docs.confluent.io/platform/current/installation/versions-interoperability.html#linux-on-ibm-z-s390x-support).

## Configuration

For a complete list of configuration properties for this connector, see
[Configuration Reference for Solace Sink Connector for Confluent Platform](configuration.md#solace-sink-connector-config).

For an example of how to get Kafka Connect connected to [Confluent Cloud](/cloud/current/index.html), see
[Connect Self-Managed Kafka Connect to Confluent Cloud](/cloud/current/cp-component/connect-cloud-config.html#distributed-cluster).

<a id="solace-sink-connector-install"></a>

## Install the Solace Sink Connector

You can install this connector by using the [confluent connect
plugin
install](https://docs.confluent.io/confluent-cli/current/command-reference/connect/plugin/confluent_connect_plugin_install.html)
command, or by manually downloading the ZIP file.

### Prerequisites

- You must install the connector on every machine where Connect will run.
- Kafka Broker: Confluent Platform 3.3.0 or later, or Kafka 0.11.0 or later
- Connect: Confluent Platform 4.1.0 or later, or Kafka 1.1.0 or later (requires header
  support in Connect)
- Solace cluster with JMS 1.1 support
- `com.solacesystems:sol-jms` Client Library. For more details, see
  [Solace Client Library](#solace-client-jar)
- Java 1.8
- An install of the [Confluent Hub Client](https://docs.confluent.io/home/connect/confluent-hub/client.html)

  #### NOTE
  This is installed by default with Confluent Enterprise
- An install of the latest (`latest`) connector version

  To install the `latest` connector version, navigate to your Confluent Platform
  installation directory and run the following command:
  ```bash
  confluent connect plugin install confluentinc/kafka-connect-solace-sink:latest
  ```

  You can install a specific version by replacing `latest` with a version
  number as shown in the following example:
  ```bash
  confluent connect plugin install confluentinc/kafka-connect-solace-sink:1.0.0-preview
  ```

<a id="solace-client-jar"></a>

### Solace Client Library

The Kafka Connect Solace connector does not come with the Solace JMS client
library.

If you are running a multi-node Connect cluster, the Solace connector and
Solace JMS client JAR must be installed on every Connect worker in the
cluster. See below for details.

<a id="installing-solace-client-jar"></a>

#### Install the Solace JMS Client Library

This connector relies on a provided `com.solacesystems:sol-jms` client JAR
distributed by Solace. The connector will fail to create a connection to Solace
if you have not installed the JAR on each Connect worker node.

The installation steps are:

1. Download the [Solace JMS API](https://products.solace.com/download/JMS_API). Additional versions are
   available on [Maven](https://mvnrepository.com/artifact/com.solacesystems/sol-jms).
2. Unzip the download and copy **only** the `lib/sol-jms-{version}.jar` file
   into the `share/java/kafka-connect-solace-sink` directory of your Confluent Platform
   installation **on each worker node**. If downloading the library from Maven,
   you do not need to unzip anything as the jar file is the only artifact
   downloaded.
3. Restart all of the Connect worker nodes.

#### NOTE
The `share/java/kafka-connect-solace-sink` directory mentioned above is
for Confluent Platform. If you are using a different installation, find the location of
the Confluent Solace sink connector JAR files and place the `sol-jms` JAR
file into the same directory.

### Install the connector manually

[Download and extract the ZIP file](https://www.confluent.io/hub/confluentinc/kafka-connect-solace-sink) for
your connector and then follow the manual connector installation
[instructions](/kafka-connectors/self-managed/install.html).

<a id="solace-sink-connector-quickstart"></a>

## Quick Start

This quick start uses the Solace Sink connector to consume records from Kafka and
send them to a Solace PubSub+ Standard broker.

1. Start a Solace PubSub+ Standard docker container.
   ```bash
   docker run -d --name "solace" --hostname "solace" \
     -p 8080:8080 -p 55555:55555 -p 5550:5550 \
     --shm-size=1000000000 \
     --tmpfs /dev/shm \
     --ulimit nofile=2448:38048 \
     -e username_admin_globalaccesslevel=admin \
     -e username_admin_password=admin \
     -e system_scaling_maxconnectioncount=100 \
     solace/solace-pubsub-standard:9.1.0.77
   ```
2. Install the connector through the [Confluent Hub Client](https://docs.confluent.io/current/connect/managing/confluent-hub/client.html).
   ```bash
   # run from your CP installation directory
   confluent connect plugin install confluentinc/kafka-connect-solace-sink:latest
   ```
3. [Install the Solace JMS Client Library](#installing-solace-client-jar).
4. Start the Confluent Platform.
   ```bash
   confluent local start
   ```
5. [Produce](https://docs.confluent.io/current/cli/command-reference/confluent-produce.html)
   test data to the `sink-messages` topic in Kafka.
   ```bash
   seq 10 | confluent local produce sink-messages
   ```
6. Create a `solace-sink.json` file with the following contents:
   ```json
   {
     "name": "SolaceSinkConnector",
     "config": {
       "connector.class": "io.confluent.connect.jms.SolaceSinkConnector",
       "tasks.max": "1",
       "topics": "sink-messages",
       "solace.host": "smf://localhost:55555",
       "solace.username": "admin",
       "solace.password": "admin",
       "solace.dynamic.durables": "true",
       "jms.destination.type": "queue",
       "jms.destination.name": "connector-quickstart",
       "key.converter": "org.apache.kafka.connect.storage.StringConverter",
       "value.converter": "org.apache.kafka.connect.storage.StringConverter",
       "confluent.topic.bootstrap.servers": "localhost:9092",
       "confluent.topic.replication.factor": "1"
     }
   }
   ```
7. Load the Solace Sink connector.
   ```bash
   confluent local load solace --config solace-sink.json
   ```
8. Confirm the connector is in a `RUNNING` state.
   ```bash
   confluent local status solace
   ```
9. Navigate to the [Solace UI](http://localhost:8080) to confirm the messages
   were delivered to the `connector-quickstart` queue in the `default`
   Message VPN.
