Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"As a past ******* customer(and not a happy one), IQ Feed by DTN is a much better and cheaper product with great customer support. I have had no problems at all since switching over." - Comment from Public Forum
"It’s so nice to be working with real professionals!" - Comment from Len
"You are either overstaffed or people just don't have problems with your feed because customer support always answers the phone quickly." - Comment from Jay via Email
"This beats the pants off CQG, I am definitely switching to the ProphetX 3.0!" - Comment from Stephen
"DTN feed was the only feed that consistently matched Bloomberg feed for BID/ASK data verification work these past years......DTN feed is a must for my supply & demand based trading using Cumulative Delta" - Comment from Public Forum Post
"I am keeping IQFeed, much better reliabilty than *******. I may refer a few other people in the office to switch as well." - Comment from Don
"IQFeed version 4 is a real screamer compared to anything else I have seen." - Comment from Tom
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"Excellent datafeed !!!" - Comment from Arely
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »Data feed not recovering after internet disuption
Author Topic: Data feed not recovering after internet disuption (3 messages, Page 1 of 1)

bludev
-Interested User-
Posts: 16
Joined: Nov 14, 2012


Posted: Nov 14, 2012 10:02 PM          Msg. 1 of 3
Hi,
I am experiencing an issue where IQFeed level 1 data never recovers after an unexpected internet disruption.

My application detects the initial internet outage and properly closes all port connections (admin, level 1, level 2 and history) and then starts regular attempts at reconnection until it succeeds when the internet connection is restored. But then every so often (could be intermittent) although my connection to level 1 (port 5009) is successful, I do not receive any live tick data at all, but somehow I can retrieve historical data (port 9100) without any problem.

I can confirm that this is not a problem within the application code, because of two observations
1. “Seconds since last update” in the feed status steadily increases indicating no level 1 data is being received by IQFeed
2. The IQConnect test in the diagnostics tool fails for level 1 data.

So my questions are:
1. Is this a known bug?
2. If so, are there any immediate plans to release a fix?
3. Seeing as the client application thinks it is “successfully” connected to level 1 port, is there any way of programmatically detecting the fault? (other than detecting ticks which can be a problem if the market is shut and we trade many markets in many time zones with daylight saving, so this approach can get tedious)
4. Assuming there is some way for the application to know when the IQfeed level 1 data is not working, then is there a workaround other than closing IQfeed completely and restarting again?

I am developing in Windows 7 x64 and have had this same experience with both IQFeed version 4.8 and 4.9.

Thank you in advance.
Edited by bludev on Nov 14, 2012 at 10:03 PM

DTN_Steve_S
-DTN Guru-
Posts: 2093
Joined: Nov 21, 2005


Posted: Nov 15, 2012 08:47 AM          Msg. 2 of 3
Hello, there are no known bugs pertaining to what you describe. However, any scenario where the feed gets into a state where it thinks it is connected to a server while not being connected is certainly not intended.

In order to help identify the source of this, can you expand on your reconnection logic?

You mention that your app closes all local connections to IQFeed. This should cause the feed to shut down and at that point you would need to re-launch the feed to reconnect (in your case, it sounds like you are repeatedly launching the feed). Is that accurate for how you are handling the scenario?

bludev
-Interested User-
Posts: 16
Joined: Nov 14, 2012


Posted: Nov 25, 2012 09:36 PM          Msg. 3 of 3
Hi,

Thanks for your reply and sorry for my late response:

Here is my attempt at a summary overview of how we use IQFeed

To connect we have an AttemptConnection() routine which roughly speaking does the following...

SocketAdmin_.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"9300"))
SocketAdmin_.Send("S,REGISTER CLIENT APP,[productid]," & ID)
SocketLevelI _.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"5009"))
SocketLevelI_.Send("S,REQUEST STATS")
listening to receive "REGISTER CLIENT APP COMPLETED"
SocketLevelII _.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"9200"))
SocketHistoricData _.Connect(New IPEndPoint(IPAddress.Parse("127.0.0.1"),"9100"))

The routine is designed such that any failure or time-out at any of the above steps would return false and we try again by repeating the process at some later point. If every line executes normally then the routine return true and we assume that the connection with IQFeed is established normally and tick data must be coming through.

Any exceptions while attempting to Connect, Send, Receive or ListenForData, will trigger a ConnectionClosed() event. This event’s handler includes the following instructions:

SocketAdmin_.Close()
SocketLevelI_.Close()
SocketLevelII_.Close()
SocketHistoricData_.Close()

to clean everything up. At this stage the IQFeed application is NOT closed and the tray icon persists. We then run AttemptConnection() asynchronously in a timed loop until a connection is established.

As I mentioned before, this often works. But sometimes if the cause of the initial disconnect is unexpected internet outage, then AttemptConnection() returns true giving the impression that everything is ok but then no data is received. So I guess one issue to look at is how to programmatically detect the problem in the first place.

Please let me know if you need me to be more specific about any of the above procedures and provide more information.
Edited by DTN_Jay_Froscheiser on Nov 26, 2012 at 07:44 AM
 

 

Time: Tue April 23, 2024 3:48 PM CFBB v1.2.0 8 ms.
© AderSoftware 2002-2003