.. _tibco-source-connector: TIBCO Source Connector for |cp| =============================== The |kconnect-long| TIBCO Source connector is used to move messages from `TIBCO Enterprise Messaging Service (EMS) `__ to |ak-tm|. Messages are consumed from the TIBCO EMS broker using the configured :ref:`message selectors ` and written to a single |ak| topic. A :ref:`connect_transforms_supported` can be used to route messages to multiple |ak| topics. The connector currently supports consuming JMS `TextMessage `_ and `BytesMessage `_ but not `ObjectMessage `_ or `StreamMessage `_. .. note:: If you are required to use the Java Naming and Directory Interface™ (JNDI) to connect to TIBCO EMS, there is a general :ref:`JMS Source Connector ` available that uses a JNDI-based mechanism to connect to the JMS broker. .. _tibco_source_connector_prereqs: Prerequisites ------------- The following are required to run the |kconnect-long| TIBCO Source Connector: * |ak| Broker: |cp| 3.3.0 or above, or |ak| 0.11.0 or above * |kconnect|: |cp| 4.1.0 or above, or |ak| 1.1.0 or above (requires header support in |kconnect|) * TIBCO EMS with JMS 1.1 support * ``tibjms`` Client Library (See :ref:`installing_tibco_client_lib`) * Java 1.8 .. _tibco_source_connector_install: Install the TIBCO Source Connector ---------------------------------- .. include:: ../../includes/connector-install.rst .. include:: ../../includes/connector-install-hub.rst .. codewithvars:: bash confluent-hub install confluentinc/kafka-connect-tibco-source:latest .. include:: ../../includes/connector-install-version.rst .. codewithvars:: bash confluent-hub install confluentinc/kafka-connect-tibco-source:1.0.0-preview -------------------------- Install Connector Manually -------------------------- `Download and extract the ZIP file `_ for your connector and then follow the manual connector installation :ref:`instructions `. .. _tibco_source_connector_license: License ------- .. include:: ../../includes/enterprise-license.rst See :ref:`tibco-source-connector-license-config` for license properties and :ref:`tibco_source_license-topic-configuration` for information about the license topic. .. _tibco_client_lib: TIBCO Client Library -------------------- The |kconnect-long| TIBCO Source Connector does not come with the TIBCO JMS client library. If you are running a multi-node |kconnect| cluster, the connector and TIBCO JMS client JAR must be installed on **every** |kconnect| worker in the cluster. See below for details. .. _installing_tibco_client_lib: ----------------------------------- 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 |kconnect| worker node. The installation steps are: #. Download and Install TIBCO Enterprise Message Service™ (`Mac `_ or `Linux `_). If you have already installed TIBCO EMS, skip to the next step. #. Unzip the download and copy **only** the ``tibco/ems/{version}/lib/tibjms.jar`` file into the ``share/java/kafka-connect-tibco-source`` directory of your |cp| installation **on each worker node**. #. Restart all of the |kconnect| worker nodes. .. note:: The ``share/java/kafka-connect-tibco-source`` directory mentioned above is for |cp|. If you are using a different installation, find the location of the Confluent TIBCO Source Connector JAR files and place the ``tibjms`` JAR file into the same directory. .. include:: ../../includes/jms-message-schemas.rst .. _tibco_source_connector_quickstart: Quick Start ----------- This quick start uses the TIBCO Source Connector to consume records from TIBCO Enterprise Message Service™ - Community Edition and send them to |ak|. #. Download TIBCO Enterprise Message Service™ - Community Edition (`Mac `_ or `Linux `_) and run the appropriate installer. See the `TIBCO Enterprise Message Service™ Installation Guide `_ for more details. Similar documentation is available for each version of TIBCO EMS. #. Install the connector through the `Confluent Hub Client `_. .. codewithvars:: bash # run from your Confluent Platform installation directory confluent-hub install confluentinc/kafka-connect-tibco-source:latest #. :ref:`Install the TIBCO JMS Client Library `. #. Start |cp|. .. include:: ../../../includes/cli-new.rst .. codewithvars:: bash |confluent_start| #. Create a ``connector-quickstart`` queue with the TIBCO Admin Tool. .. codewithvars:: bash # connect to TIBCO with the Admin Tool (PASSWORD IS EMPTY) tibco/ems/8.4/bin/tibemsadmin -server "tcp://localhost:7222" -user admin > create queue connector-quickstart .. important:: Java 6+ must be installed to run the TIBCO Samples. Run ``java -version`` to check if Java installed's on your system. The command will print out the current Java version if Java is installed. If Java is not installed, go through the `Java Installation Guide `_ before moving on to the next step. #. Compile the TIBCO Java samples so that they can be run in the following step. .. codewithvars:: bash # setup Java's classpath so that the Java compiler can find the imports of the samples cd tibco/ems/8.4/samples/java export TIBEMS_JAVA=tibco/ems/8.4/lib CLASSPATH=${TIBEMS_JAVA}/jms-2.0.jar:${CLASSPATH} CLASSPATH=.:${TIBEMS_JAVA}/tibjms.jar:${TIBEMS_JAVA}/tibjmsadmin.jar:${CLASSPATH} export CLASSPATH # compile the java classes (run from the tibco/ems/8.4/samples/java directory) javac *.java #. Produce a set of messages to the ``connector-quickstart`` queue. .. codewithvars:: bash cd tibco/ems/8.4/samples/java # produce 5 test messages java tibjmsMsgProducer -user admin -queue connector-quickstart m1 m2 m3 m4 m5 ------------------------------------------------------------------------ tibjmsMsgProducer SAMPLE ------------------------------------------------------------------------ Server....................... localhost User......................... admin Destination.................. connector-quickstart Send Asynchronously.......... false Message Text................. m1 m2 m3 m4 m5 ------------------------------------------------------------------------ Publishing to destination 'connector-quickstart' Published message: m1 Published message: m2 Published message: m3 Published message: m4 Published message: m5 #. Create a ``tibco-source.json`` file with the following contents: .. codewithvars:: json { "name": "TibcoSourceConnector", "config": { "connector.class": "io.confluent.connect.tibco.TibcoSourceConnector", "tasks.max": "1", "kafka.topic": "from-tibco-messages", "tibco.url": "tcp://localhost:7222", "tibco.username": "admin", "tibco.password": "", "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" } } #. Load the TIBCO Source Connector. .. include:: ../../../includes/confluent-local-consume-limit.rst .. codewithvars:: bash |confluent_load| tibco|dash| -d tibco-source.json #. Confirm that the connector is in a ``RUNNING`` state. .. codewithvars:: bash |confluent_status| TibcoSourceConnector #. Confirm the messages were delivered to the ``from-tibco-messages`` topic in |ak|. .. codewithvars:: bash |confluent_consume| from-tibco-messages --from-beginning Additional Documentation ------------------------ .. toctree:: :maxdepth: 1 connector_config changelog