Patent ID: 8019847

Claim:
A method for detecting a loop in a publish/subscribe network, the publish/subscribe network having at least one broker, comprising: connecting a new broker to the publish/subscribe network by creating a first new connection between the new broker and a parent broker and a second new connection between the new broker and a neighbor broker of the new broker in the publish/subscribe network, the new broker from which the first new connection is made, the parent broker to which the first new connection is made; creating a loop detection message at the new broker, the loop detection message comprising information representing the new broker, the parent broker, all topics which are published at the new broker over the new connections; sending the loop detection message from the new broker to the parent broker over the first new connection or to the neighbor broker of the new broker over the second new connection, the parent broker or the neighbor broker of the new broker forwarding the loop detection message to a receiving broker of the publish/subscribe network; upon receiving the loop detection message at the receiving broker, checking if the receiving broker is the new broker from which the loop detection message is originated; if the receiving broker is not the new broker, removing topics in the loop detection message, the removed topics that are not registered to a neighbor broker of the receiving broker, and forwarding the loop detection message having the removed topics that are not registered to the neighbor broker of the receiving broker, to the neighbor broker of the receiving broker; repeating the checking, the removing, and forwarding the loop detection message having the removed topics until no topics remain in the loop detection message if the receiving broker is not determined as the new broker; if the receiving broker is the new broker, deciding that a loop is created by the new connections; and upon deciding that the loop is created by the new connections, canceling the new connections in order to prevent publications from entering the loop.