From 5aa163fff8dd47b924f9f415f7b822695fdfa515 Mon Sep 17 00:00:00 2001 From: Ramkumar K Date: Wed, 14 Feb 2024 17:43:51 +0530 Subject: [PATCH] 6928 documentation of mp reactive messaging stream operators 3-3 6928 documentation of mp reactive messaging stream operators 3-3 #6928 --- .../ROOT/pages/liberty-kafka-connector.adoc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/modules/ROOT/pages/liberty-kafka-connector.adoc b/modules/ROOT/pages/liberty-kafka-connector.adoc index 56f3384183..4d3df2ca0c 100644 --- a/modules/ROOT/pages/liberty-kafka-connector.adoc +++ b/modules/ROOT/pages/liberty-kafka-connector.adoc @@ -15,15 +15,23 @@ = Optimizing Kafka Integration with MicroProfile Messaging -= Integrating MicroProfile Reactive Messaging with Apache Kafka in Open Liberty Applications - The integration of MicroProfile Reactive Messaging with Apache Kafka in Open Liberty applications is a significant development in cloud-native microservice designs as it provides an efficient method of asynchronous communication. MicroProfile Reactive Messaging offers a solution, that enables applications to handle data streams reactively across microservices, ensuring systems are scalable and resilient. Apache Kafka, a distributed event-streaming platform, enhances this ecosystem by providing a robust platform for high-throughput, fault-tolerant event streaming, essential for event-driven architectures. By focussing to integrate these technologies through the `liberty-kafka` connector in Open Liberty, you get a comprehensive overview of setting up, configuring, and optimizing the `liberty-kafka` connector within the Open Liberty ecosystem, ensuring that you leverage Kafka's capabilities within a MicroProfile Reactive Messaging framework to build robust, efficient microservices. +The core aspects of integrating MicroProfile Reactive Messaging with Apache Kafka in Open Liberty, detailed through the following topics: + +* <<#lkconnector,Liberty-kafka Connector>> +* <<#configuration,Configuration>> +* <<#kcconfsec,Kafka Connector Configuration and Security>> +* <<#sendrecemessages,Sending and receiving messages between applications using connectors>> +* <<#connectoroptionschannelprop,Connector Options and Channel Properties>> +* <<#troubleshooting,Troubleshooting>> + +[#lkconnector] == Liberty-kafka Connector The `liberty-kafka` connector is a feature within Open Liberty that facilitates seamless integration with Apache Kafka, enabling applications to send and receive messages from a Apache Kafka broker. @@ -45,6 +53,7 @@ mp.messaging.incoming.myChannel.connector=liberty-kafka This allows for detailed control over messaging channels, including attributes like `bootstrap.servers` for connection setup and topic for message targeting, enhancing application scalability and resilience through efficient message handling. +[#configuration] == Configuration To configure the `Liberty-kafka` connector effectively, follow these steps: @@ -141,6 +150,8 @@ To configure these permissions, you can use the `server.xml` configuration file. ---- + +[#kcconfsec] == Kafka Connector Configuration and Security For configuring the Kafka connector and security in Open Liberty, focus on the distinction between channel-specific and connector-wide properties for tailored messaging behavior. @@ -159,6 +170,7 @@ Configure these by setting the appropriate security properties in the `microprof Examples include specifying security protocols and credentials, allowing for secure message exchanges across your microservices architecture. +[#sendrecemessages] == Sending and receiving messages between applications using connectors To send and receive messages from other systems, reactive messaging uses connectors. Connectors can be attached to one end of a channel and are configured using MicroProfile Config. @@ -195,6 +207,7 @@ It indicates the use of the `liberty-kafka` connector for managing the connectio This enables the application to offload messages to the Kafka topic `bar`, to distributed messaging, which can enhance scalability and flexibility in handling data flows. +[#connectoroptionschannelprop] == Connector Options and Channel Properties The `Liberty-kafka` connector offers a range of properties to fine-tune its operation. You can set these properties on the `Liberty-kafka` connector to define certain behaviors during operation. @@ -318,7 +331,7 @@ By defining separate context services, the application can isolate certain opera These configurations demonstrate the flexibility and control you have over message processing in Open Liberty applications. - +[#troubleshooting] == Troubleshooting For troubleshooting the `Liberty-kafka`` connector, focus on resolving common issues such as connectivity with Kafka, managing multiple server instances, and assigning unique identifiers to producers and consumers.