How does the EMS server detect a cycle in route?

How does the EMS server detect a cycle in route?

book

Article ID: KB0091193

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Message Service -
Not Applicable -

Description

Resolution:
Description:
===================
How does the EMS server detect a cycle in route?

Resolution:
==================
An EMS server can have routes defined belonging to several zones. When zones overlap at a server, the routing behavior within each zone does not limit routing in other zones. That is, when a message is routed to reach an EMS server with routes in several zones, the message can cross zone boundaries and its hop count is reset to zero. The message can cross zone boundaries. This could potentially cause a message to reach to a server by more than one path and cause cycle. EMS permits a message to reach the same server by more than one path.

The cycle detection is based on the temporary topics corresponding to server names that are exchanged when routes are established.  When a new route is added, the two EMS servers involved in the new route will exchange the routing protocol messages, so they know from each other the interests represented by the temporary topics corresponding to server names. The EMS server detects cycle when there are more than one temporary topics corresponding to the same server name, meaning a message could  reach to the same server by more than one path.

For m-hop zones suppose server A has a route to B and a route to C in a multi-hop zone. Then, if a route from A to D is established, server D would have these 3 temporary topics: $TMP$.A.>, $TMP$.B.> and $TMP$.C.>. If you were trying to create a route from B to D, the cycle would be detected because B would send $TMP$.A.> and $TMP$.C.> that D already has a path to.

For 1-hop zones, what needs to be known is that when 2 zones overlap, the point of contact does not count as a hop. For instance, see those 2 1-hop zones:

B - A         D - E
|      and    |
C              F - G

If you now connect A to D, then A will know about D, E and F, without creating a cycle. But G is not reachable by the first zone.

If you then try to create a route from, say G to A, then there will be a cycle.


       |-------------
       |                |
B - A - D - E    |
|           |           |
C         F - G----


Why? Because A knows about D, E, and F from the A-D route, but now would have two paths to F. One is A-D-F, the other is A-G-F.

Issue/Introduction

How does the EMS server detect a cycle in route?