Configuring the BusinessEvents Kafka Channel to publish to a TIBCO Cloud Messaging (TCM) Kafka Service

Configuring the BusinessEvents Kafka Channel to publish to a TIBCO Cloud Messaging (TCM) Kafka Service

book

Article ID: KB0072183

calendar_today

Updated On:

Products Versions
TIBCO BusinessEvents Enterprise Edition 6.x

Description

This article provides guidance on configuring the BusinessEvents Kafka Channel to publish to a TIBCO Cloud Messaging (TCM) Kafka service. The TCM configuration file is obtained from the TCM web ui, and is used to configure the necessary Kafka Channel properties. This allows you to publish messages from a locally-run BusinessEvents application to topics brokered by your TCM Kafka service.

Issue/Introduction

Provides the steps needed to configure the BusinessEvents Kafka Channel to connect to a TIBCO Cloud Messaging (TCM) Kafka Service, and publish messages.

Resolution

In the TCM web ui, go to the ' Authentication' screen and select ' Create Role'. Provide a Role Name, and select the Kafka service. Also ensure this role is entitled to publish messages.

create TCM pub role

When you are returned to the Authentication screen, you should now see the role you created in your role list. In the ' Configuration File' column, select the option to download the role configuration file ( tcm-config.yaml). This file contains the authentication key for this role, as well as the connection details for the Kafka TCM service.

download TCM config

In Studio, open the Kafka Channel definition, and set the ' Kafka Broker URLs' property to the value of the ' kafka_broker' shown in your tcm-config.yaml. For example:
  • Kafka Broker URLs = tib-sub-****.messaging.cloud.tibco.com:12345
Also set additional properties:
  • Security Protocol = SASL_SSL
  • SASL mechanism = PLAIN
Edit your existing JAAS configuration file, or create a new one. In this example, we will create a new JAAS configuration file named ' kafka_client_jaas_tcm.conf' with the following contents:
 
 KafkaClient {   org.apache.kafka.common.security.plain.PlainLoginModule required     username="<kafka_username>"   password="<kafka_password>"; };

..where <kafka_username> and <kafka_password> correspond to those values specified in the tcm-config.yaml. For example..
 
 KafkaClient {   org.apache.kafka.common.security.plain.PlainLoginModule required     username="TIB_SUB_*********/channel"   password="token:***********"; };

Finally, specify the path to the JAAS configuration file. This may be done in a Studio Run Configuration under the VM Arguments section:

BE jaas run config

The  java.security.auth.login.config property may also be set in your *.cdd or *.tra files.

Your local BusinessEvents application is now configured to publish messages to your TCM Kafka service.