我們利用Rabbitmq進(jìn)行各類業(yè)務(wù)系統(tǒng)(如SAP、OA、EHR、KMS、訪客系統(tǒng)、AD等)的集成和接口,已有很長一段時(shí)間了,初步建立了企業(yè)服務(wù)總線(ESB)。隨著新業(yè)務(wù)系統(tǒng)的不斷接入到ESB中,在實(shí)踐中也發(fā)現(xiàn)了一些問題并總結(jié)了一些經(jīng)驗(yàn),下文主要介紹如何在windows下突破 Rabbitmq的socket限制數(shù),以便為需要使用的同學(xué)分享一些實(shí)際經(jīng)驗(yàn),后續(xù)將陸續(xù)分享一些技術(shù)經(jīng)驗(yàn)。
第一、 RabbitMQ_Limits文檔說明
Status of node rabbit@MYSERVER ...
[{pid,6604},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","2.8.2"},
{xmerl,"XML parser","1.3"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","2.8.2"},
{amqp_client,"RabbitMQ AMQP Client","2.8.2"},
{rabbit,"RabbitMQ","2.8.2"},
{os_mon,"CPO CXC 138 46","2.2.8"},
{sasl,"SASL CXC 138 11","2.2"},
{rabbitmq_mochiweb,"RabbitMQ Mochiweb Embedding","2.8.2"},
{webmachine,"webmachine","1.7.0-rmq2.8.2-hg"},
{mochiweb,"MochiMedia Web Server","1.3-rmq2.8.2-git"},
{inets,"INETS CXC 138 49","5.8"},
{mnesia,"MNESIA CXC 138 12","4.6"},
{stdlib,"ERTS CXC 138 10","1.18"},
{kernel,"ERTS CXC 138 10","2.15"}]},
{os,{win32,nt}},
{erlang_version,"Erlang R15B (erts-5.9) [smp:4:4] [async-threads:30]n"},
{memory,
[{total,22807872},
{processes,8644230},
{processes_used,8644210},
{system,14163642},
{atom,495069},
{atom_used,485263},
{binary,665136},
{code,9611946},
{ets,877468}]},
{vm_memory_high_watermark,0.20002174609205853},
{vm_memory_limit,858993459},
{disk_free_limit,4294500352},
{disk_free,26035458048},
{file_descriptors,
[{total_limit,924},
{total_used,24},
{sockets_limit,829}, 默認(rèn)的限制sockets數(shù)為829
{sockets_used,22}]},
{processes,[{limit,1048576},{used,388}]},
{run_queue,0},
{uptime,72329}]
1、 如何在windows下擴(kuò)展sockets數(shù)量,提高吞吐量?
(A)、需要在windows系統(tǒng)環(huán)境變量中設(shè)置erlang的ERL_MAX_PORTS
(B)重啟RabbitMQ服務(wù)才能正式生效
(C)擴(kuò)展后的最終效果如下:
結(jié)語:通過以上的步驟,就可以解決啦!