TIBCO Sink Connector for Confluent Platform
The Kafka Connect TIBCO Sink Connector is used to move messages from Kafka to
TIBCO Enterprise Messaging Service (EMS).
If you are required to use the Java Naming and Directory Interface™ (JNDI) to
connect to TIBCO EMS, there is a general JMS Sink Connector for Confluent
available that uses a JNDI-based mechanism to connect to the JMS broker.
The TIBCO Sink Connector includes the following features:
At least once delivery
This connector guarantees that records from the Kafka topic are delivered at
The TIBCO 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 huge performance gains when multiple files need to be parsed.
The following are required to run the Kafka Connect TIBCO Sink Connector:
- Kafka Broker: Confluent Platform 3.3.0 or above, or Kafka 0.11.0 or above
- Connect: Confluent Platform 4.1.0 or above, or Kafka 1.1.0 or above (requires header support in Connect)
- TIBCO EMS with JMS 1.1 support
tibjms Client Library (See Installing TIBCO JMS Client Library)
- Java 1.8
Install the TIBCO Sink Connector
You can install this connector by using the Confluent Hub client installation
instructions or by manually
downloading the ZIP file.
You must install the connector on every machine where Connect will run.
An install of the Confluent Hub Client.
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:
confluent-hub install confluentinc/kafka-connect-tibco-sink:latest
You can install a specific version by replacing
latest with a version
number as shown in the following example:
confluent-hub install confluentinc/kafka-connect-tibco-sink:1.0.0-preview
TIBCO Client Library
The Kafka Connect TIBCO connector does not come with the TIBCO JMS client library.
If you are running a multi-node Connect cluster, the TIBCO connector and
TIBCO JMS client JAR must be installed on every Connect worker in the
cluster. See below for details.
Installing TIBCO JMS Client Library
This connector relies on a provided
tibjms client JAR that is included in
the TIBCO EMS installation. The connector will fail to create a connection to
TIBCO EMS if you have not installed the JAR on each Connect worker node.
The installation steps are:
- Download and Install TIBCO Enterprise Message Service™ (Mac
If you have already installed TIBCO EMS, skip to the next step.
- Unzip the download and copy only the
file into the
share/java/kafka-connect-tibco-sink directory of your Confluent Platform
installation on each worker node.
- Restart all of the Connect worker nodes.
share/java/kafka-connect-tibco-sink directory mentioned above is for
Confluent Platform. If you are using a different installation, find the location of the
Confluent TIBCO Sink Connector JAR files and place the
tibjms JAR file
into the same directory.
JMS Message Formats
The format of outgoing JMS Message values is configured with the
jms.message.format property, using one of the following options:
When using the
string Message Format, record values are run through
Values.convertToString(...) from the Connect Data package and produced as a
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.
Single Message Transformation can
be used with the configured
jms.message.format to transform the record
value to the desired string representation before the connector processes
Record values are serialized without the Avro schema information and produced as
BytesMessage. JMS consumers must have the schema to deserialize the data.
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
Record values are converted to a UTF-8 encoded JSON representation and produced
as a JMS
Record values are passed along in bytes form without any conversion.
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.
Forwarding Kafka Properties to JMS
The connector can be configured to forward various values from the Kafka record
to the JMS Message.
jms.forward.kafka.key to convert the record’s key to a string and
forward it as the
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
- Partition is applied to the message as an Int property named
- Offset is applied to the message as a Long property named
jms.forward.kafka.headers to add each header from the SinkRecord to
the JMS Message as a string property.
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 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.
This quick start uses the TIBCO Sink Connector to consume records from Kafka and
send them to TIBCO Enterprise Message Service™ - Community Edition.
Download TIBCO Enterprise Message Service™ - Community Edition (Mac
and run the appropriate installer. See the TIBCO Enterprise Message Service™
for more details. Similar documentation is available for each version of TIBCO
Install the connector through the Confluent Hub Client.
# run from your CP installation directory
confluent-hub install confluentinc/kafka-connect-tibco-sink:latest
Install the TIBCO JMS Client Library.
Start the Confluent Platform.
The command syntax for the Confluent CLI development commands changed in 5.3.0.
These commands have been moved to
confluent local. For example, the syntax for
confluent start is now
confluent local services start. For more information, see confluent local.
confluent local services start
test data to the
sink-messages topic in Kafka.
seq 10 | confluent local services kafka produce sink-messages
tibco-sink.json file with the following contents:
Load the TIBCO Sink Connector.
You must include a double dash (
--) between the topic name and your flag. For more information,
see this post.
confluent local services connect connector load tibco --config tibco-sink.json
Confirm that the connector is in a
confluent local services connect connector status tibco
Confirm the messages were delivered to the
connector-quickstart queue in
# open TIBCO admin tool (password is empty)
tibco/ems/8.4/bin/tibemsadmin -server "tcp://localhost:7222" -user admin
> show queue connector-quickstart