Font Size: a A A

Design And Implementation Of Communication Model Based On Improved ActiveMQ

Posted on:2018-12-11Degree:MasterType:Thesis
Country:ChinaCandidate:C ZhouFull Text:PDF
GTID:2348330515476454Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
With the arrival of big data era,the performance of a single machine has been unable to meet the needs of most scenes,computer systems typically provide services in a distributed manner.Distributed systems,although able to break through the performance bottlenecks of a single machine,but in the construction and maintenance phase is very complex,especially in the various aspects of the message communication.In order to improve the communication efficiency between distributed nodes and optimize the overall performance of the cluster,the message queue came into being.Active MQ is today the most widely used enterprise-class message queue,it conforms to the JMS specification,and has a high security and excellent cross-platform.In this paper,Active MQ research and use found that the current Active MQ there are the following problems: the point-to-point mode and publish/subscribe mode using two different interfaces,making the complexity of the mode conversion increased;the existing message delivery and storage is not conducive to large Data under the message to find and consume,when the message queue traffic reaches the peak,it is easy to cause the message to accumulate on the consumer client.In order to solve the above problems,this article on the message queue Active MQ made the following improvements:First,improve the consumption strategy of the message.In the consumer client to introduce consumer groups,consumer groups as a unit for the consumption of the message.Consumer groups are independent of each other,the client within the consumer group is assigned a fixed message partition,through the group of clients on the same subject message co-consumption,you can logically achieve both point-to-point mode and publish/subscribe mode.Second,improve the delivery of messages.The way the message is delivered is changed from push to pull,and the control of the message location information is transferred from the server to the consumer client.In this way on the one hand can reduce the burden on the server,on the other hand can reduce consumer client's message accumulation due to the caused by large amount of messages.Third,improve the storage of messages.On the basis of the original message queue partition,the design of partition divide is added,and a secondary index is established for the message.When the consumer client pulls the message from the server through the message id,it first locates the partition of the message in the binary search mode through the message id,and then obtains the offset of the message in the log file through the index file of the partition.Locating messages through a secondary index can increase the consumption rate of messages in the case of large data.This paper tests the improved model.The influence of the number of clients and the size of the message block on the system throughput is determined by experiment.The improved model is compared with the original model under the same experimental environment.The test results show that the improved communication model has good expansibility,and it is superior to the original message queue in the face of large data volume.Finally,the improved model is applied to the information flow update of the product data management platform,which ensures the real-time flow of data information and state information in the system and improves the overall operation speed of the system.
Keywords/Search Tags:Communication Model, Message Queue, ActiveMQ, JMS, Message Shard
PDF Full Text Request
Related items