Routing
Sentinet defines routing as the capability to route messages received at the virtual inbound endpoint to more than one alternative outbound endpoint of the same virtualized physical service. Forwarding a message to a single endpoint of the virtualized service or forwarding a message to outbound endpoints of different virtualized services (in aggregation scenarios) is not considered "Sentinet routing". When a business service defines more than one endpoint, some (or all of them) can be included in the message routing by placing a checkmark against each endpoint that request messages can be routed to.
When more than one endpoint of the physical service is available for routing, the Endpoints tree element is shown with the Router definition button.
Clicking this button opens the dialog box that configures outbound endpoints with the specific routing rules (Sentinet Endpoints Router configuration). By default, Sentinet uses Round-Robin routing between all available endpoints with equal distribution of the load. On its outbound side, a Sentinet Node behaves as a typical load-balancer device and by default will fall back (retry) to the next available endpoint if communication fails for the current endpoint (Enable Failover default settings). This fallback does not apply to SOAP faults that are valid responses and not communication failures or to any REST responses received from REST services regardless of the HTTP status codes.
Sentinet supports a variety of built-in and custom routers:
Round-Robin with equal load distribution and built-in fault tolerance.
Simple Fault Tolerance. Defines endpoints in a priority list, where messages are always sent to an endpoint with higher priority and fall back to one with lower priority if the former receives a communication failure (drag-and-drop endpoints to arrange them in the desired order of priority).
Multicast. Multicast Router forwards messages to all check marked endpoints. This router can be assigned only if virtual service is comprised with one-way operations. Effectively, Sentinet Multicast Router implements a publish/subscribe pattern, where subscribers are multiple endpoints of the virtualized service.
Business service gets registered with multiple endpoints either when imported metadata contains multiple endpoints or when administrators manually add additional endpoints (see the Add and Remove Service Endpoints chapter).
Custom. Custom routing allows assignment of custom routing rules implemented with custom code (see the Custom Router sample for an example of how to develop a custom router). Custom Router is typically implemented as a class in a custom assembly that implements an interface defined in the Sentinet API. Custom routers can route messages between different endpoints of the same business service based on the current date/time, message content or any other criteria. To use a custom router, it has to be registered with Sentinet as an extensibility component.
Navigate to Repository root tree item, first select CONFIGURATION, then EXTENSIBILITY tab and click the + Add above the Custom Routers table (see Sentinet Extensibility chapter for generic description of the Sentinet extensibility features).
Provide a router-friendly name, assembly, and type (class) definition.
Once a custom router is registered with Sentinet, it will be available in the dropdown list of all available Routers described above in this chapter.
Custom assembly with a custom router class must be deployed with the Sentinet Node application. This can be done by either:
placing the custom assembly in the Node's bin directory, or
by registering assembly in the .NET 4.0 Global Assembly Cache