当前位置: 动力学知识库 > 问答 > 编程问答 >

Develop Apache Kafka producer and load testing using JMeter

问题描述:

Is it possible to use JMeter to push messages to Apache Kafka.

How to implement producer (in JAVA) to push messages to Kafka.

Regards,

Anand

网友答案:

I thought there was an answer earlier, maybe not. Have you taken a look at these? I'm using the original kafkameter myself.

https://github.com/BrightTag/kafkameter

https://github.com/EugeneYushin/new-api-kafkameter

and tutorials on kafakmeter:

http://www.technix.in/load-testing-apache-kafka-using-kafkameter

http://codyaray.com/2014/07/custom-jmeter-samplers-and-config-elements

For use outside of JMeter, I've found it easier to write a producer load tool in say ruby, python, or node.js than in Java. But it's personal preference. Load scalability is another matter but other languages are easier to prototype out a producer tool.

网友答案:

Yes you can go with the Jmeter by using the above external libraries given by @David, above. Just to add, I'd recommend you to have two different programs for both consumer and producer so that you'll be in more control on what's going on. Such as optimizing and changing the property files within the config according to your requirements. Even though JMeter sounds easy on loadtesting, I'm not sure whether you'll be able to identify the efficiency of message consumption or production, such as identifying the number of messages published or consumed within a certain amount of period (ie: if you're dealing with large number of messages).

Kafka Produce Sample given in the doc and this

分享给朋友:
您可能感兴趣的文章:
随机阅读: