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

# Solace Source Connector for Confluent Platform

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

Messages are consumed from the Solace broker using the configured [message
selectors](configuration.md#solace-source-message-selector-config) and written to a single Kafka
topic. A [Single Message Transformation](/platform/current/connect/transforms/index.html)
can be used to route messages to multiple Kafka topics.

Solace PubSub+ uses the Solace Message Format (SMF) protocol, a proprietary
binary message format, for client and message broker communications. To ensure
compatibility with the Solace Source connector, messages should be published to
Solace using SMF or they may not have a `MessageID` (required for JMS). For
more information, see the Solace documentation on [Message Components](https://docs.solace.com/Solace-JMS-API/Message-Components.htm).

#### NOTE
- If you are required to use the Java Naming and Directory Interface™
  (JNDI) to connect to Solace, there is a general [JMS Source connector for
  Confluent Platform](https://docs.confluent.io/kafka-connect-jms-source/current/index.html)
  available that uses a JNDI-based mechanism to connect to the JMS broker.
- <!-- 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 Source connector includes the following features:

- [At least once delivery](#solace-source-at-least-once-delivery)
- [Multiple tasks](#solace-source-multiple-tasks)
- [JMS messages](#solace-source-jms-messages)
- [Schemas](#solace-source-connector-schemas)
- [Client-side encryption](#solace-source-csfle-sm)

<a id="solace-source-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-source-multiple-tasks"></a>

### Multiple tasks

The Solace Source 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-source-jms-messages"></a>

### JMS messages

The connector currently supports consuming the following JMS messages:

- [TextMessage](http://docs.oracle.com/javaee/6/api/javax/jms/TextMessage.html)
- [BytesMessage](http://docs.oracle.com/javaee/6/api/javax/jms/BytesMessage.html)

The connector does not support [ObjectMessage](http://docs.oracle.com/javaee/6/api/javax/jms/ObjectMessage.html) or
[StreamMessage](http://docs.oracle.com/javaee/6/api/javax/jms/StreamMessage.html).

<a id="solace-source-connector-schemas"></a>

### Schemas

The Solace Source connector produces messages with keys and values that adhere to the
schemas described in the following sections.

<a id="solace-source-connector-schema-key"></a>

#### io.confluent.connect.jms.Key

This schema is used to store the incoming MessageID on the message interface.
This will ensure that when the same message ID arrives it will end up in
the same partition. In practice this should never occur. The schema defines the
following fields:

| Name      | Schema   | Required   | Default Value   | Documentation                                                                                                                                 |
|-----------|----------|------------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| messageID | STRING   | yes        |                 | This field stores the value of<br/>[Message.getJMSMessageID()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSMessageID()). |

<a id="solace-source-connector-schema-value"></a>

#### io.confluent.connect.jms.Value

This schema is used to store the value of the JMS message. The schema defines
the following fields:

| Name          | Schemna                                                                       | Required   | Default Value   | Documentation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|---------------|-------------------------------------------------------------------------------|------------|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| messageID     | STRING                                                                        | yes        |                 | This field stores the value of<br/>[Message.getJMSMessageID()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSMessageID()).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| messageType   | STRING                                                                        | yes        |                 | This field stores the type of message that was received. This corresponds<br/>to the sub-interfaces of [Message](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html).<br/>[BytesMessage](http://docs.oracle.com/javaee/6/api/javax/jms/BytesMessage.html) =<br/>`bytes`, [MapMessage](http://docs.oracle.com/javaee/6/api/javax/jms/MapMessage.html) = `map`,<br/>[ObjectMessage](http://docs.oracle.com/javaee/6/api/javax/jms/ObjectMessage.html) =<br/>`object`, [StreamMessage](http://docs.oracle.com/javaee/6/api/javax/jms/StreamMessage.html) =<br/>`stream` and [TextMessage](http://docs.oracle.com/javaee/6/api/javax/jms/TextMessage.html) =<br/>`text`. The corresponding field will be populated with the values from the<br/>respective message sub-interface. |
| timestamp     | INT64                                                                         | yes        |                 | Data from the [getJMSTimestamp()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSTimestamp())<br/>method.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| deliveryMode  | INT32                                                                         | yes        |                 | This field stores the value of [Message.getJMSDeliveryMode()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSDeliveryMode()).<br/>method.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| correlationID | STRING                                                                        | no         |                 | This field stores the value of [Message.getJMSCorrelationID()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSCorrelationID()).<br/>method.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| replyTo       | [Destination](#solace-source-connector-schema-destination)                    | no         |                 | This schema is used to represent a JMS Destination, and is either [queue](http://docs.oracle.com/javaee/6/api/javax/jms/Queue.html) or [topic](http://docs.oracle.com/javaee/6/api/javax/jms/Topic.html).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| destination   | [Destination](#solace-source-connector-schema-destination)                    | no         |                 | This schema is used to represent a JMS Destination, and is either [queue](http://docs.oracle.com/javaee/6/api/javax/jms/Queue.html) or [topic](http://docs.oracle.com/javaee/6/api/javax/jms/Topic.html).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| redelivered   | BOOLEAN                                                                       | yes        |                 | This field stores the value of [Message.getJMSRedelivered()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSRedelivered()).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| type          | STRING                                                                        | no         |                 | This field stores the value of [Message.getJMSType()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSType()).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| expiration    | INT64                                                                         | no         |                 | This field stores the value of [Message.getJMSExpiration()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSExpiration()).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| priority      | INT32                                                                         | no         |                 | This field stores the value of [Message.getJMSPriority()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getJMSPriority()).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| properties    | Map of STRING, [PropertyValue](#solace-source-connector-schema-propertyvalue) | yes        |                 | This field stores the data from all of the properties for the Message indexed by their propertyName.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| bytes         | BYTES                                                                         | no         |                 | This field stores the value from<br/>[BytesMessage.html.readBytes(byte[])](http://docs.oracle.com/javaee/6/api/javax/jms/BytesMessage.html#readBytes(byte[])).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| map           | Map of STRING, [PropertyValue](#solace-source-connector-schema-propertyvalue) | no         |                 | This field stores the data from all of the map entries returned from<br/>[MapMessage.getMapNames()](http://docs.oracle.com/javaee/6/api/javax/jms/MapMessage.html#getMapNames())<br/>for the Message indexed by their key.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| text          | STRING                                                                        | no         |                 | This field stores the value from [TextMessage.html.getText()](http://docs.oracle.com/javaee/6/api/javax/jms/TextMessage.html#getText()).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |

<a id="solace-source-connector-schema-destination"></a>

#### io.confluent.connect.jms.Destination

This schema is used to represent a JMS Destination, and is either [queue](http://docs.oracle.com/javaee/6/api/javax/jms/Queue.html) or [topic](http://docs.oracle.com/javaee/6/api/javax/jms/Topic.html).

The schema defines the following fields:

| Name            | Schema   | Required   | Default Value   | Documentation                                                                                                                                                                                                                                                             |
|-----------------|----------|------------|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| destinationType | STRING   | yes        |                 | The type of JMS Destination, and either `queue` or `topic`.                                                                                                                                                                                                               |
| name            | STRING   | yes        |                 | The name of the destination. This will be the value of<br/>[Queue.getQueueName()](http://docs.oracle.com/javaee/6/api/javax/jms/Queue.html#getQueueName())<br/>or [Topic.getTopicName()](https://docs.oracle.com/javaee/6/api/javax/jms/Topic.html#Topic.getTopicName()). |

<a id="solace-source-connector-schema-propertyvalue"></a>

#### io.confluent.connect.jms.PropertyValue

This schema is used to store the data that is found in the properties of the
message. To ensure that the proper type mappings are preserved field
`propertyType` stores the value type for the field. The corresponding field in
the schema will contain the data for the property. This ensures that the data is
retrievable as the type returned by [Message.getObjectProperty()](http://docs.oracle.com/javaee/6/api/javax/jms/Message.html#getObjectProperty(java.lang.String)).
The schema defines the following fields:

| Name         | Schema   | Required   | Default Value   | Documentation                                                                                                                           |
|--------------|----------|------------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------|
| propertyType | STRING   | yes        |                 | The Java type of the property on the Message. One of `boolean`, `byte`,<br/>`short`, `integer`, `long`, `float`, `double`, or `string`. |
| boolean      | BOOLEAN  | no         |                 | The value stored as a boolean. Null unless `propertyType` is set to `boolean`.                                                          |
| byte         | INT8     | no         |                 | The value stored as a byte. Null unless `propertyType` is set to `byte`.                                                                |
| short        | INT16    | no         |                 | The value stored as a short. Null unless `propertyType` is set to `short`.                                                              |
| integer      | INT32    | no         |                 | The value stored as a integer. Null unless `propertyType` is set to `integer`.                                                          |
| long         | INT64    | no         |                 | The value stored as a long. Null unless `propertyType` is set to `long`.                                                                |
| float        | FLOAT32  | no         |                 | The value stored as a float. Null unless `propertyType` is set to `float`.                                                              |
| double       | FLOAT64  | no         |                 | The value stored as a double. Null unless `propertyType` is set to `double`.                                                            |
| string       | STRING   | no         |                 | The value stored as a string. Null unless `propertyType` is set to `string`.                                                            |

<a id="solace-source-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-source-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-source-connector-license-config) for license properties and
[License topic configuration](configuration.md#solace-source-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 Source Connector for Confluent Platform](configuration.md#solace-source-connector-config). To understand how the connector internally
configures the acknowledgement mode, see the following section.

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-source-ack-mode"></a>

### Acknowledgement mode

The connector internally uses `CLIENT_ACKNOWLEDGE` mode to receive and
acknowledge messages from the JMS broker. In this mode, acknowledging any
message will acknowledge every message received (see section 6.2.10 in the [JMS
2.0 Specification](https://download.oracle.com/otndocs/jcp/jms-2_0-fr-eval-spec/)). To prevent
messages from being prematurely acknowledged, the connector processes only one
message at time. In other words, the connector will not try to receive new
messages until the last message is committed to a Kafka topic. This might
compromise the throughput of the connector, but messages will be transferred to
Kafka successfully.

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

## Install the Solace Source 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
  [Install the Solace JMS Client Library](#install-solace-client-jar)
- Java 1.8
- 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-source: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-source:1.0.0-preview
  ```

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

### Solace Client Library

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

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

<a id="install-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://repo.maven.apache.org/maven2/com/solacesystems/sol-jms/10.19.0/sol-jms-10.19.0.jar).

   #### NOTE
   This connector is only compatible with 10.19.0 version of Solace JMS API.
2. Unzip the download and copy only the `lib/sol-jms-{version}.jar` file into
   the `share/java/kafka-connect-solace-source` 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-source` directory mentioned above is
for Confluent Platform. If you are using a different installation, find the location of
the Confluent Solace source 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-source) for
your connector and then follow the manual connector installation
[instructions](/kafka-connectors/self-managed/install.html).

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

## Quick Start

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

1. Install the connector through the [Confluent Hub Client](https://docs.confluent.io/current/connect/managing/confluent-hub/client.html).
   ```bash
   # run from your Confluent Platform installation directory
   confluent connect plugin install confluentinc/kafka-connect-solace-source:latest
   ```
2. [Install the Solace JMS Client Library](#install-solace-client-jar).
3. Start the Confluent Platform.
   ```bash
   confluent local start
   ```
4. Start a Solace PubSub+ Standard docker container.
   ```bash
   docker run -d --name "solace" \
     -p 8080:8080 -p 55555:55555 -p 9000:9000 \
     --shm-size=1000000000 \
     --tmpfs /dev/shm \
     --ulimit nofile=2448:38048 \
     -e username_admin_globalaccesslevel=admin \
     -e username_admin_password=admin \
     solace/solace-pubsub-standard:9.1.0.77
   ```
5. Once the Solace docker container has started, navigate to the [Solace UI](http://localhost:8080) and configure a `connector-quickstart` queue in
   the `Default` message VPN.
6. Publish messages to the Solace queue using the REST endpoint.
   ```bash
   curl -X POST -d "m1" http://localhost:9000/Queue/connector-quickstart -H "Content-Type: text/plain" -H "Solace-Message-ID: 1000"

   # repeat the above command to send additional messages (change the Solace-Message-ID header on each message)
   ```
7. Create a `solace-source.json` file with the following contents:
   ```json
   {
     "name": "SolaceSourceConnector",
     "config": {
       "connector.class": "io.confluent.connect.solace.SolaceSourceConnector",
       "tasks.max": "1",
       "kafka.topic": "from-solace-messages",
       "solace.host": "smf://localhost:55555",
       "solace.username": "admin",
       "solace.password": "admin",
       "jms.destination.type": "queue",
       "jms.destination.name": "connector-quickstart",
       "key.converter": "org.apache.kafka.connect.storage.StringConverter",
       "value.converter": "io.confluent.connect.avro.AvroConverter",
       "value.converter.schema.registry.url": "http://localhost:8081",
       "confluent.topic.bootstrap.servers": "localhost:9092",
       "confluent.topic.replication.factor": "1"
     }
   }
   ```
8. Load the Solace Source connector.
   ```bash
   confluent local load solace --config solace-source.json
   ```
9. Confirm the connector is in a `RUNNING` state.
   ```bash
   confluent local status SolaceSourceConnector
   ```
10. Confirm the messages were delivered to the `from-solace-messages` topic in
    Kafka.
    ```bash
    kafka-avro-console-consumer --bootstrap-server localhost:9092 --property schema.registry.url=http://localhost:8081 --topic from-solace-messages --from-beginning
    ```
