How To Configure Ems Kafka Bridge
How To Configure Ems Kafka Bridge
Global Headquarters
3307 Hillview Avenue
Palo Alto, CA 94304 How to Bridge TIBCO Enterprise
Tel: +1 650-846-1000 Message Service™ and Apache
Toll Free: 1 800-420-8450
Fax: +1 650-846-1005
Kafka® with TIBCO FTL®
www.tibco.com This document provides the steps for configuring and testing the
bridge between TIBCO Enterprise Message Service, TIBCO FTL, and
Apache Kafka
Trademarks
TIBCO and the TIBCO logo are either registered trademarks or trademarks of TIBCO Software Inc. in the
United States and/or other countries. All other product and company names and marks mentioned in this
document are the property of their respective owners and are mentioned for identification purposes only.
Content Warranty
The information in this document is subject to change without notice. THIS DOCUMENT IS PROVIDED "AS
IS" AND TIBCO MAKES NO WARRANTY, EXPRESS, IMPLIED, OR STATUTORY, INCLUDING BUT
NOT LIMITED TO ALL WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
PURPOSE. TIBCO Software Inc. shall not be liable for errors contained herein or for incidental or
consequential damages in connection with the furnishing, performance or use of this material.
TIBCO Messaging provides connectors to bridge TIBCO FTL and Apache Kafka. The purpose of
the document is to provide a guide on how to install, configure, and test the TIBCO bridge between
TIBCO FTL, and Apache Kafka. Although there is no direct bridge from TIBCO Enterprise
Message Service (EMS) and Apache Kafka, TIBCO EMS and TIBCO FTL also can be bridged.
This guide will provide the steps necessary for configuring the bridge between TIBCO Enterprise
Message Service and TIBCO FTL, thus allowing messages to be sent/received from TIBCO EMS
to Apache Kafka.
The document will outline:
• Configuration of EMS to bridge to FTL
• Configuration of FTL to bridge to Apache Kafka
• Configuration of a bidirectional tibftl-connector to bridge Kafka and FTL for simple string
messages
• Simple tests to ensure bidirectional message transfer between EMS/FTL and Kafka. For
sending/receiving more complex message structures between the components, refer to the
appropriate TIBCO messaging component documentation.
This document covers the installation and configuration of EMS, FTL, and Kafka on Linux. This
document is based on RedHat/CentOS 7.9 Linux.
However, other Linux kernels can be used as well as MacOS, so long as they are supported
versions by the TIBCO Messaging components and Apache Kafka.
Note: Configuration for other operating systems is not provided as part of this document.
1.4 Assumptions
The following steps will outline installing and configuring TIBCO Messaging, which includes
TIBCO EMS, TIBCO FTL, and Apache Kafka – TIBCO Distribution (AKD).
TIBCO EMS, FTL, and AKD should all be installed following their respective installation guides.
All components are part of the TIBCO Messaging - Enterprise Edition which can be download
from https://edelivery.tibco.com or TIBCO Messaging - Community Edition which can be
downloaded from https://www.tibco.com/products/tibco-messaging/downloads. There are no
special installation requirements.
Follow the post installation steps for each of the respective messaging component. Once
completed, it is recommended to update the /etc/profile with the following:
Once TIBCO Enterprise Message Service (EMS) has been installed, the component can be
configured for the bridge to TIBCO FTL. The tibemsd, transports, bridges, queues, and topics
configuration files require modifications.
Note: This document will show updating the conf versions of the EMS configuration files. If using
Json, update accordingly.
Note: Do not start EMS after making the EMS configuration file changes. Wait until FTL has been
started and configured.
2.3.1 Tibemsd.conf
The tibemsd.conf must be updated to enable the tibftl_transport , module_path, and the FTL URL.
©2022 TIBCO Software Inc. All Rights Reserved. 7
Note: username,password,trustfile, and loglevel can also be set, if required.
Set/add:
● tibftl_transports = enabled
● module_path = <EMS_HOME>/ems/10.1/lib/:/<FTL_HOME>/ftl/6.7/lib
● ftl_url = The FTL URL <http://localhost:8585>
Note: Take note of the name of the EMS Server. The default is EMS-SERVER
tibftl_transports = enabled
########################################################################
# FTL setup. These global parameters are used only when FTL transports
# are enabled, and apply to all FTL transports. The "ftl_url" parameter
# is required when FTL transports are enabled.
# The "ftl_trustfile" parameter is required when using a TLS
# connection to FTL and validating the FTL server.
########################################################################
ftl_url = http://localhost:8585
ftl_username =
ftl_password =
ftl_trustfile =
ftl_log_level = warn
########################################################################
2.3.2 Transports.conf
Transports.conf must be updated to include a new reference for a new transport type. In this case,
FTL. Once the tibftl_transports is enabled in tibemsd.conf, TIBCO EMS expects the
transports.conf to reference an FTL definition. The tibftl type must be defined, along with an ftl
endpoint. There are other possible parameters, but at a minimum, the tibftl type and FTL endpoint
must be defined. The following shows an example of what should be added to transports.conf to
import messages to a topic and persisted queue.
[FTLtopic]
type = tibftl
endpoint = FTLtopic
[FTLqueuein]
type = tibftl
endpoint = FTLqueuein
queue_import_dm = TIBEMS_PERSISTENT
[FTLqueueout]
type = tibftl
endpoint = FTLqueueout
2.3.3 Topics.conf
The topics.conf configuration file requires modifications to support the FTL bridge. Topics.conf
must be updated to include the topics which will be used to import and export messages to FTL.
The new topics and the FTL endpoints will then be used to import/export messages between EMS
and FTL.
Note: in the following example, two topics are created/used. The ftltopic topic is used to import
and export messages, while the ftlqueueout topic is only used for exports. The topic ftltopic is not
used in the test, but show how to setup a simple topic for use in EMS/FTL bridging.
ftltopic import="FTLtopic",export="FTLtopic"
ftlqueueout export="FTLqueueout"
[queue:ftlqueueout]
topic=ftlqueueout
Figure 6 - bridges.conf example
Note: Messages sent to a bridged queue are not removed after being exported to FTL, and must be
manually purged if an expiration time is not defined.
The FTL configuration setup for testing the FTL-EMS bridge is done via the FTL URL. Use the
following to setup the FTL configuration to create the FTL-EMS bridge, the Kafka-FTL bridge.
FTL and EMS are now bridged to send/receive messages between the components.
Once the FTL and EMS components are configured and bridged, the TIBCO Kafka-FTL bridge
can be configured. There are two connectors; source and sink. The source connector is used to
publish messages to Kafka from FTL, and the sink connector will provide the ability to publish
messages from Kafka to FTL. First configure and start the Kafka components.
Follow the TIBCO Messaging -Installation and Configuration Guides for details on configuring
these properties files. It is recommended that copies be made of both files before editing.
plugin.path=/opt/tibco/akd/bridge/2.3/lib
If both connectors start up correctly, use the following to startup the connectors in the background:
This section will outline simple tests of the connectors to ensure messages sent/received between
Kafka and FTL, and FTL and EMS. Tests will show sending messages from EMS via FTL to
Kafka, and sending message from Kafka to EMS via FTL.
In this section, EMS will send messages via FTL to Kafka. The EMS sample java application
tibjmsMsgProducer, FTL sample program tibrecvex, and the Kafka kafka-connect-consumer.sh
script will be used to test the bridge between the messaging components.
3.1.1 Setting Up the EMS Send Tests
For these tests, the Kafka topic is ftlout, the FTL application is kafka-connect-source, the FTL
endpoint is FTLqueueout, and the EMS topic or queue ftlqueueout are used.
Start the FTL receiver test program. In the following example, the FTL Server is running
http://localhost:8585, the endpoint is FTLqueueout, the FTL application is EMS_SERVER, and the
message count to receive is 5.
/opt/tibco/ftl/6.7/samples/bin/advanced/tibrecvex -a EMS-SERVER -e FTLqueueout -c 5
http://localhost:8585
#
# ./tibrecvex
#
# TIBCO FTL Version 6.7.2 V7
#
Invoked as: ./tibrecvex -a EMS-SERVER -e FTLqueueout -c 5 http://localhost:8585
waiting for message(s)
Start the Kafka consumer script. In the following example, the Kafka Server is running on
localhost:9092, and is listening for messages on the ftlout topic.
/opt/tibco/akd/core/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ftlout
Finally, run the EMS sample java application, tibjmsMsgProducer to send five messages to FTL.
In the following example, the EMS server is running at tcp://7222, and the topic is ftlqueueout.
cd /opt/tibco/ems/10.1/samples/java
. ./setup.sh
java tibjmsMsgProducer -server tcp://7222 -topic ftlqueueout message1 message2 message3 message4
message5
------------------------------------------------------------------------
tibjmsMsgProducer SAMPLE
------------------------------------------------------------------------
Server....................... tcp://7222
User......................... (null)
Destination.................. ftlqueueout
Send Asynchronously.......... false
Message Text.................
message1
message2
message3
FTL:
Invoked as: ./tibrecvex -a EMS-SERVER -e FTLqueueout -c 5 http://localhost:8585
waiting for message(s)
received message 1
message:
{string:_text="message1", long:_emshdr:JMSDeliveryMode=2, long:_emshdr:JMSPriority=4,
string:_emshdr:JMSMessageID="ID:EMS-SERVER.E71D620164562D:1",
long:_emshdr:JMSTimestamp=1644337687165, long:_emshdr:JMSDeliveryTime=1644337687165,
string:_emshdr:JMSDestination="TOPIC:ftlqueueout"}
received message 2
message:
{string:_text="message2", long:_emshdr:JMSDeliveryMode=2, long:_emshdr:JMSPriority=4,
string:_emshdr:JMSMessageID="ID:EMS-SERVER.E71D620164562D:2",
long:_emshdr:JMSTimestamp=1644337687165, long:_emshdr:JMSDeliveryTime=1644337687165,
string:_emshdr:JMSDestination="TOPIC:ftlqueueout"}
received message 3
message:
{string:_text="message3", long:_emshdr:JMSDeliveryMode=2, long:_emshdr:JMSPriority=4,
string:_emshdr:JMSMessageID="ID:EMS-SERVER.E71D620164562D:3",
long:_emshdr:JMSTimestamp=1644337687166, long:_emshdr:JMSDeliveryTime=1644337687166,
string:_emshdr:JMSDestination="TOPIC:ftlqueueout"}
received message 4
message:
{string:_text="message4", long:_emshdr:JMSDeliveryMode=2, long:_emshdr:JMSPriority=4,
string:_emshdr:JMSMessageID="ID:EMS-SERVER.E71D620164562D:4",
long:_emshdr:JMSTimestamp=1644337687166, long:_emshdr:JMSDeliveryTime=1644337687166,
string:_emshdr:JMSDestination="TOPIC:ftlqueueout"}
received message 5
message:
{string:_text="message5", long:_emshdr:JMSDeliveryMode=2, long:_emshdr:JMSPriority=4,
string:_emshdr:JMSMessageID="ID:EMS-SERVER.E71D620164562D:5",
long:_emshdr:JMSTimestamp=1644337687166, long:_emshdr:JMSDeliveryTime=1644337687166,
string:_emshdr:JMSDestination="TOPIC:ftlqueueout"}
Kafka:
/opt/tibco/akd/core/bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ftlout
{"_text":"message1","_emshdr:JMSDeliveryMode":2,"_emshdr:JMSPriority":4,"_emshdr:JMSMessageID":"ID:
EMS-
SERVER.E71D620164562D:1","_emshdr:JMSTimestamp":1644337687165,"_emshdr:JMSDeliveryTime":16443376871
65,"_emshdr:JMSDestination":"TOPIC:ftlqueueout"}
{"_text":"message2","_emshdr:JMSDeliveryMode":2,"_emshdr:JMSPriority":4,"_emshdr:JMSMessageID":"ID:
EMS-
Now that sending messages from EMS via FTL to Kafka, has been tested, messages sent from
Kafka to EMS can be tested. The Kafka kafka-console-producer.sh script, FTL sample program
tibrecvex, and the EMS sample java application tibjmsMsgConsumer will be used to test the bridge
between the messaging components.
3.2.1 Setting up the Kafka Send Test
For these tests, the Kafka topic is ftlin, the FTL endpoint is FTLqueuein, and the EMS queue is
ftlqueuein will be used.
Start the FTL receiver test program. In the following example, the FTL Server is running on
http://localhost:8585, the endpoint is FTLqueuein, the FTL application is EMS_SERVER, and the
message count to receive is 5.
/opt/tibco/ftl/6.7/samples/bin/advanced/tibrecvex -a EMS-SERVER -e FTLqueuein -c 5
http://localhost:8585
#
# ./tibrecvex
#
# TIBCO FTL Version 6.7.2 V7
#
Invoked as: ./tibrecvex -a EMS-SERVER -e FTLqueuein -c 5 http://localhost:8585
waiting for message(s)
Start the EMS consumer java application. In the following example, the EMS server is running at
tcp://7222, and the queue ftlqueuein.
cd /opt/tibco/ems/10.1/samples/java
. ./setup.sh
java tibjmsMsgConsumer -server tcp://7222 -queue ftlqueuein
------------------------------------------------------------------------
tibjmsMsgConsumer SAMPLE
------------------------------------------------------------------------
Server....................... tcp://7222
User......................... (null)
Destination.................. ftlqueuein
------------------------------------------------------------------------
EMS:
------------------------------------------------------------------------
tibjmsMsgConsumer SAMPLE
------------------------------------------------------------------------
Server....................... tcp://7222
User......................... (null)
Destination.................. ftlqueuein
------------------------------------------------------------------------