CONSUME LATEST MESSAGE FROM KAFKA TOPIC IN MULE 4.X

CONSUME LATEST MESSAGE FROM KAFKA TOPIC IN MULE 4.X

Kafka Connector In Mule?Kafka connector helps you to interact with Apache Kafka Messaging system and provide seamless integration between mule application and apache messaging system Operation available.

  1. Set up and Install Apache Kafka On Windows
  2. Prerequisites:?Install Java and Install Zookeeper in windows

Kafka uses zookeeper so you first need to start the ZooKeeper Server, zookeeper is packaged with kafka

Run the below?command?to start zookeeper

  1. .\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties

No alt text provided for this image

Step 3:

.\bin\windows\kafka-server-start.bat .\config\server.properties

No alt text provided for this image

Command to create the topic

kafka-topics.bat –create –bootstrap-server localhost:9092 –replication-factor 1 –partitions 1 –topic test

you can verify if the topic has created successfully in kafka instance using below command

kafka-topics.bat –list –bootstrap-server localhost:9092

No alt text provided for this image

CONSUME LATEST MESSAGE FROM KAFKA TOPIC IN MULE 4.X

Drag and drop kafka publish operation from mule palette

No alt text provided for this image

Configure the producer connection details and the bootstrap server Url

No alt text provided for this image

Currently I have kept all the default values as is and Producer?Acknowledge Mode=ALL

No alt text provided for this image

Configure the Kafka Message Listener to consume the message from the topic

No alt text provided for this image

Convert binary Data to JSON and write the payload to file using write file connector.

No alt text provided for this image

?test to consume the latest message only

No alt text provided for this image

Reference Links: https://docs.mulesoft.com/kafka-connector/4.1/kafka-connector-reference

要查看或添加评论,请登录

Anil Samayam的更多文章

  • Mulesoft Automation with RPA

    Mulesoft Automation with RPA

    What is a bot? An automated bot is a widely used term, but there is still confusion about what bots really are. Bots…

  • ChatGPT Integrate with Mulesoft

    ChatGPT Integrate with Mulesoft

    Step1: Create an account with ChatGPT OpenAI. -> https://openai.

  • Mulesoft Interview Questions & Answers - Part-1

    Mulesoft Interview Questions & Answers - Part-1

    Which version of MuleSoft you worked? what is the difference between web services and restful services? -> Web service…

  • GitHub integration with Azure Pipelines

    GitHub integration with Azure Pipelines

    GitHub hosts over 100 million repositories containing applications of all shapes and sizes. But GitHub is just a…

  • Azure DevOps For Integration In Azure Cloud

    Azure DevOps For Integration In Azure Cloud

    Build an Azure DevOps Model For Integration DevOps has emerged as a practice that aims at minimal disruption and…

社区洞察

其他会员也浏览了