JMeter 測試 ActiveMq

JMeter 測試 ActiveMq 的資料很是少, 我花了大量的時間才研究出來apache

關於ActiveMq 的文章請參考我另外的文章。tcp

 

閱讀目錄ide

 

版本號:

ActiveMq 版本號:  5.91測試

Jmeter 版本號:     1.13spa

 

添加ActiveMq 的jar包

將    ActiveMq 下的  "activemq-all-5.9.1.jar"   複製到   "apache-jmeter-2.13\lib"  文件夾下來code

由於JMeter 測試 ActiveMq 的時候會用到ActiveMq 提供的JMS的實現類。blog

 

測試 ActiveMq中的 Topic

 

打開 JMeter, 新建一個JMS Publisher.   設置以下it

 

Initial Contest Factory  的值是: org.apache.activemq.jndi.ActiveMQInitialContextFactory
Provider URL 的值是:tcp://10.0.0.8:61616
Connection Factory的值是:ConnectionFactory
Destination的值是: dynamicTopics/topic1

Expriation: 6000
Priority:
Number of samples to aggregate: 1

 

再建一個 topic 的消費者,   打開Jmeter 新建一個JMS Subscriberio

而後在Jmeter 中添加  View Results Tree.   class

啓動ActiveMq,   運行JMeter,   咱們能夠看到 生產者發送消息成功, 消費者接收消息成功

 

打開Active Mq 管理頁面。 咱們能看到,消息被消費了

 

測試 ActiveMq中的 Queue

跟上面測試Topic的方法相似, 只是  Destionation應該是: 」dynamicQueues/queue1「  

相關文章
相關標籤/搜索