Forum Discussion

dipsthorat's avatar
dipsthorat
Occasional Contributor
2 months ago
Solved

How to post and read data from Kafka topic

Hi Everyone

Can u please suggest how to post and read data from kafka topic

  • Hi there,

    You can get more info on how to simulate producers and consumers from here - https://support.smartbear.com/readyapi/docs/testing/kafka/index.html

    Hope this helps.

5 Replies

  • Hi there,

    You can get more info on how to simulate producers and consumers from here - https://support.smartbear.com/readyapi/docs/testing/kafka/index.html

    Hope this helps.

  • Humashankar's avatar
    Humashankar
    Champion Level 0

    Hi dipsthorat 

    Kindly try with the below for the Posting data part:

    -> Typically use Kafka producer and consumer applications by using Java and the Kafka Java client.
    -> Set Up Kafka Producer Configuration - bootstrap servers (address of Kafka brokers), topic name, serialization -> settings and more
    -> Create a Kafka Producer object with the configured properties
    -> Create and Send Records which contans the data you want to post
    -> work with send() method of the KafkaProducer to send records
    -> Handle Callbacks and Errors for acknowledgments or errors from Kafka brokers-> Typically use Kafka producer and consumer applications by using Java and the Kafka Java client.
    -> Set Up Kafka Producer Configuration - bootstrap servers (address of Kafka brokers), topic name, serialization -> settings and more
    -> Create a Kafka Producer object with the configured properties
    -> Create and Send Records which contans the data you want to post
    -> work with send() method of the KafkaProducer to send records
    -> Handle Callbacks and Errors for acknowledgments or errors from Kafka brokers

     

     

    Hope this helps - Happy to help further on the Reading date upon your acknowledgment !!

    Thank you very much and have a fantastic day!

    Warm regards

    • dipsthorat's avatar
      dipsthorat
      Occasional Contributor

      Thanks for your reply.

      But I didn't understand.I need to understand how to read and post data on kafka through Ready API.

  • Hi dipsthorat, Could you please explain what is not working for you? Do you already have a Kafka topic that you have access to? If you want to read from a topic you "Subscribe" to it and if you want to send, you "Publish" to it, as per the link I sent above. As long as you have the right connection and authentication settings to the topic, you should be able to do both. You can download a sample kafka test from here if you need to see sample test steps - https://support.smartbear.com/readyapi/docs/samples/index.html