Port monitoring introduction and port optimization for ACTIVEMQ

Source: Internet
Author: User

In Activemq's Conf/activemq.xml master config file, there is this passage,

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/8B/6B/wKioL1hOO8GREhQQAAEBIUDtPqU599.png "title=" 1.png " alt= "Wkiol1hoo8grehqqaaebiudtpqu599.png"/>


The Transportconnectors field in this figure is the MQ protocol port for each network, as shown by the figure, Openwire this name uses the access port is 61616,AMQP this name's access port number is 5672. The value of name is casually written, it will also be reflected in the MQ Web connections interface, and 0.0.0.0 is the meaning of all the devices on behalf of the machine, note here can not write 127.0.0.1 or localhost, so that the word MQ is unable to connect the Internet. Look back, the following also specifies that the maximum number of links corresponding to the name of the port is 1000,wireformat.maxframesize meaning "a complete message size", which is stated here is 100M.


Add here, ACTIVEMQ the default message protocol is Openwire, which is TCP.


In the "transportconnector" tag, there are optional properties in addition to the "name" attribute and the "uri" attribute that must be filled in, for example: Enablestatusmonitor, updateclusterclients. A detailed description of the properties can be found in the section "Server Side Options" in the Official document Http://activemq.apache.org/configuring-transports.html.


In the 5.13.x of ACTIVEMQ, the Apache company simplified the section and became the following.

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/6B/wKioL1hOPwegzhz7AAApmMEnsFQ441.png "title=" 1.png " alt= "Wkiol1hopwegzhz7aaapmmensfq441.png"/>

Those 7788 of the protocol unified into a single auto, the setting of the individual protocol is also a big pot stew. This setting is not specifically specified by the ACTIVEMQ network listening port, so it uses the bio's network IO model by default, and for TCP-based network architecture, we should specifically describe the NIO network model, so we changed the configuration as follows:


650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8B/6B/wKioL1hOQIDzR7B-AAAoLpQHMg8097.png "title=" 1.png " alt= "Wkiol1hoqidzr7b-aaaolpqhmg8097.png"/>

After this change, only the TCP protocol can pass, if there are other protocols besides TCP?


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8B/6B/wKioL1hORXfjoFpuAAAWhQFGPfM762.png "title=" 1.png " alt= "Wkiol1horxfjofpuaaawhqfgpfm762.png"/>

Just change it.


If you want to highlight the force and make your MQ stronger, we should also add the following fields:

<transportconnector name= "Auto+nio" uri= "auto+nio://0.0.0.0:61608?maximumconnections=1000&amp; Wireformat.maxframesize=104857600&amp;org.apache.activemq.transport.nio.selectormanager.corepoolsize=20 &amp;org.apache.activemq.transport.nio.selectormanager.maximumpoolsize=50 "/>


There is also an additional set of thread pool core worker threads used by NIO and the maximum number of worker threads.

This article is from "Life is waiting for Gordo" blog, please make sure to keep this source http://chenx1242.blog.51cto.com/10430133/1881924

Port monitoring introduction and port optimization for ACTIVEMQ

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.