摘要
消息总线是一种通信工具,可以在机器之间互相传输消息、文件等。消息总线扮演着一种消息路由的角色,拥有一套完备的路由机制来决定消息传输方向。发送端只需要向消息总线发出消息而不用管消息被如何转发。Rabbit MQ是一个开源跨平台跨语言的AMQP实现。首先介绍了Rabbit MQ的特点,并对其相关对象和消息传递机制做了阐述。然后,在其基础之上增加了消息总线控制功能,构建了一个通用的异步全双工消息总线,展示了部分实现细节,并验证了其性能,提出了相关改进意见,还探讨了在多线程并发环境下的线程安全问题。经过实践证明,该消息总线功能稳定,可以提高电信增值业务的开发效率和呼叫中心业务的处理性能。
Message bus is a communication tool,which can transfer messages and files between machines and so on.The message bus acts as a role of message routing,and has a complete routing mechanism to determine the direction of message transmission.The sender only needs to send a message to the message bus instead of the message being transmitted.RabbitMQ is an open source cross platform cross language AMQP implementation.The characteristics of RabbitMQ are introduced,and the related objects and message transfer mechanism are described.Then,on the basis of the above,the message bus control function is added,and a universal asynchronous full duplex message bus is con-structed.And its performance is verified,and the relevant improvement suggestions are put forward.After practice,the function of the message bus is stable,and it can improve the development efficiency of the telecom value-added service and the processing performance of the call center business.
出处
《软件》
2016年第2期139-146,共8页
Software