Results 1 to 2 of 2

Thread: Fail-Over

  1. #1
    Join Date
    Oct 2007
    Colorado Springs


    Is there a way through the .NET API to cause the connection to be re-established after a failure? For example, using the StockList demo if the client is up and Lightstreamer server is shutdown, the client detects the connection loss. However, if Lightstreamer is restarted it appears the client is not re-connected. This is different from the web-based client which re-connects.

    If it is not part of the API, what is the suggested design for handling this situation? Is it acceptable to start a thread that periodically attempts to connect to Lightstreamer and when successful terminate the thread?

    Thanks in advance for the help.

  2. #2
    Join Date
    Jul 2006
    I confirm that such recovery mechanisms are not part of the API, as application code has full control of the case and could perform the recovery in the most convenient way.

    A loop of periodic invocations to OpenConnection on a single LSClient object is suitable;
    as soon as OpenConnection returns (that is, it does not throw any exception) the connection is established and the loop can terminate.

    Note that there is no internal check on the time OpenConnection takes to return.
    If adding a custom timeout check should turn out to be useful, however, a new LSClient instance would be needed in order to start a new parallel attempt.

    Also note that, unlike the Web Client, upon disconnection the current subscriptions are discarded and will not be automatically reissued after a successful reconnection, despite that the same LSClient object instance is used.



Similar Threads

  1. Reconnection attempts fail
    By emiliob in forum Client SDKs
    Replies: 12
    Last Post: October 14th, 2010, 08:00 AM
  2. Which is the better fail over mechanisam
    By dimitarn in forum General
    Replies: 3
    Last Post: March 30th, 2010, 12:13 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT +1. The time now is 10:04 AM.