Enterprise Service Bus (ESB) provides the integration of multi application systems in Service-Oriented Architecture (SOA). Message routing is the core and basis of ESB. At present, the routing mechanisms in ESB software are all static, relying on tedious configuration file, limited routing flexibility. At the same time, along with the increase of the number of services, service configuration information is growing exponentially, affect system performance. In order to solve these problem, a method of content-based routing is presented firstly. Then we introduced the messages format, route table, work process and the algorithm in detail. Finally, experimental results showed that the proposed method was efficient and reliable.