Patent ID: 7793140

Claim:
A computer implemented method for managing failover in a server cluster, the computer implemented method comprising: responsive to detecting a failed server in the server cluster within a distributed network, stopping, by a failover server, subscription message processing of a subscription message queue for the failover server; opening, by the failover server, a subscription message queue of the failed server; publishing, by the failover server, a marker message to all subscribers of a particular messaging topic that includes an identification of the failover server that is now managing the subscription message queue of the failed server and the marker message is ignored by all other servers in the server cluster, wherein the marker message appears at a same time in both the subscription message queue of the failed server and the subscription message queue for the failover server in a first-in-first-out order at a time when the failover occurred and is used to synchronize the subscription message queue of the failed server and the subscription message queue for the failover server prior to the failover server resuming normal operation after the failover; processing, by the failover server, messages within the subscription message queue of the failed server; determining, by the failover server, if a message in the subscription message queue of the failed server is the marker message; responsive to determining that the message in the subscription message queue of the failed server is the marker message, closing, by the failover server, the subscription message queue of the failed server; and resuming, by the failover server, the subscription message processing of the subscription message queue for the failover server.