基于JMS的数据交换总线及接口研究
2015-08-19朱国库蒋文保
朱国库+++蒋文保



【 摘 要 】 应用程序之间的数据交换可以通过Web Service接口方式和Socket通信方式来实现。针对Web Service接口方式应用系统和服务的装配和配置复杂、成本高的问题,论文提出了基于JMS(Java Message Service,Java消息服务)的数据交换总线的实现,消息生产者将消息发送到总线消息队列上,总线将消息路由分发到消息的目的接收者,每个应用程序只需配置一个消息接收地址即可实现系统间的数据交换。
【 关键词 】 JMS;数据交换总线;消息队列;数据接口;数据交换
Research of Data Exchange Bus and the Interface Based on JMS
Zhu Guo-ku Jiang Wen-bao
(Beijing Information Science and Technology University Beijing 100192)
【 Abstract 】 Data exchange among applications can be performed with the implementation of Web Service and socket programming interface. Because the assembly and configuration of applications and services is complex and expensive in the mode of Web Service, a solution of a data exchange bus based on JMS (Java Message Service) is proposed in this paper to solve this problem. Message producers send the messages to the bus channel, and then the messages will be distributed and sent into the destinations by the bus. And each of the applications just has one message queue need to be configured to receive the data.
【 Keywords 】 jms; data exchange bus; message queue; data interface; data exchange
1 引言
为解决应用系统之间数据交换量大、交换效率低、可靠性能低等问题,数据交换通常采用面向服务架构和企业服务总线系统架构设计实现。面向服务的架构由可重用的服务组成,通过Web Service接口实现的服务组件装配复杂,应用系统出现数据交换需求变更后要重新生成服务,ESB(Enterprise Service Bus,企业服务总线)上的服务组件需要重新装配,会造成交换网络中断,交换数据丢失的问题,并且Web服务地址暴露存在遭受恶意攻击的可能。
应用程序间可以在消息中间件的基础上通过配置消息队列进行数据交换,随交换对象的增加,配置消息队列的复杂度会增大,消息中间件的设计模式将要应对大量的队列修改、配置工作。
基于JMS的数据交换总线为应用程序提供简单清晰的数据接口,实现了应用程序和消息中间件的解耦,并在数据传输前进行安全认证,用以保证系统间安全可靠的数据交换。
2 相关技术
JMS是一组规范了消息传输方式的消息中间件的操作接口,定义了消息的格式和传输模式,为应用集成提供了与厂商无关的消息收发服务,用户可以根据JMS规范来实现数据通信接口。……