摘要 |
A routing method, apparatus and system are disclosed. The method includes: receiving from a service provider a service registration request which carries a service logical address, a service physical address, and a message rule; registering routing information according to the service registration request; and routing a request message of a service requestor according to the routing information. The present invention enables routing of the request message of a service requestor according to the service logical address, service physical address, and message rule, so that routing is more flexible and more convenient. |
主权项 |
1. In a router configured to route service, a method for routing service, comprising:
receiving, from a service provider, a service registration request which carries a service logical address, a service physical address, and a message rule; extracting the service logical address, the service physical address, and the message rule as routing information; receiving a service request message of a service requestor; generating a routing record list including routing information that matches a service logical address of the service request message; determining routing records whose message rule matches the service request message; selecting one routing record from the matched routing records; routing the service request message to a service provider corresponding to a service physical address included in the selected routing record; if the service registration request carries only the service logical address and service physical address, deleting routing information corresponding to the service logical address and service physical address; if the service registration request carries only the service logical address, service physical address, and service instance identifier, deleting routing information corresponding to the service logical address, service physical address, and service instance identifier; and if the service registration request carries only the service logical address, service physical address, service instance identifier, and message identifier, deleting routing information corresponding to the service logical address, service physical address, service instance identifier, and message identifier. |