<destinationPolicy> <policyMap> <policyEntries> <policyEntry queue=">" memorylimit="1500mb"> <policyEntry topic=">" memorylimit="5mb"> <dispatchPolicy> <strictOrderDispatchPolicy> </strictOrderDispatchPolicy> <subscriptionRecoveryPolicy> <lastImageSubscriptionRecoveryPolicy> </lastImageSubscriptionRecoveryPolicy> </subscriptionRecoveryPolicy> </dispatchPolicy> </policyEntry> </policyEntry> </policyEntries></policyMap></destinationPolicy>
測試結果:
1. 單獨 producer
10,027 async non-persistent msgs / sec
4,462 persistent msgs / sec,單位下同
2. 單獨 consumer, 使用上步的數據
8,195
848
3. 同時(shí)producer 和 consumer, 當producer到10萬(wàn)條的時(shí)候開(kāi)始 consumer
producer avg:
5,593
960
consumer avg:
4,462
1,002
結果分析:
- 同時(shí)producer&consumer偶爾有卡住3~5s的現象(可能硬盤(pán)慢造成?),但會(huì )自動(dòng)恢復
- 使用 async non-persistent 方式速度極快,對于偶爾丟失少量數據不敏感的應用極為適合。
- 使用 persistent 和 memcacheq 的速度區別不大。
- ActiveMQ 可以 tuning,因為相關(guān)配置復雜,沒(méi)有進(jìn)一步去研究。
|