Wednesday, 10 February 2021
  4 Replies
  1.4K Visits
  Subscribe
Hi,
I found a strange behaviour I can't explain myself. The system is the same as my last post about watchdog, so the scenario is the same.
Scenario for completion
- More than 20 concurrent threads using MQTT
- RabbitMQ as broker on the same machine of my services (all works on localhost)
- Everything is fine and when connection dies, esegece does the excellent job
- The components for MQTT client connection are so configured for watchdog:


FMQTT.HeartBeat.Enabled := True;
FMQTT.HeartBeat.Interval := 5;
FMQTT.HeartBeat.Timeout := 10;
FClient.NotifyEvents := TwsNotifyEvent.neNoSync;
FClient.TCPKeepAlive.Enabled := True;
FClient.TCPKeepAlive.Time := 5000;
FClient.TCPKeepAlive.Interval := 1000;
FClient.WatchDog.Enabled := True;
FClient.WatchDog.Attempts := 0;
FClient.WatchDog.Interval := 10;


Yesterday evening this happens during a "MQTT.publish(...)":
- Socket Error # 10053 Software caused connection abort.

The exception raises DURING the publish. The algorithm is this:


if not MQTT.Active then
DoTheConnectionAndStuff; // all the job for the watchdog, too
MQTT.Publish('myMessage', 'my/veryimportant/topic'); // here the exception


This is happening only in ONE of the 20 threads. All the other works fine.
The problem seems that watchdog does not know that this is happening on the TCP level.
Any ideas?

EDIT 02.10.2021 11:15
- I am using sgc 4.4.6 on D10.3.3 completely patched

Thanks,
Eddy