Open aftabi2v opened 2 months ago
NetMQ Version: 4.0.1.13 Operating System: Windows 10 x64 .NET Version: 4.7.2
My netmq client is receiving half data from the server. This happens around 0.1 % times. Since I am receiving data of a model I am unable to deserialize the data.
public ZeroMqVAClient(string ip, string port, string topic) { try { subscriber = new SubscriberSocket(); subscriber.Options.ReceiveHighWatermark = 1000; address = "tcp://" + ip + ":" + port; subscriber.Connect(address); subscriber.Subscribe(""); poller = new NetMQPoller { subscriber }; subscriber.ReceiveReady += subscriber_ReceiveReady; poller.RunAsync(); } catch (Exception ex) { ExceptionHandler.handleException(ex.Message); } } private void subscriber_ReceiveReady(object sender, NetMQSocketEventArgs e) { string messageReceived = string.Empty; try { if (subscriber.TryReceiveFrameString(out messageReceived)) { var evnt = JsonConvert.DeserializeObject<List<VAAlertArgs>>(messageReceived); foreach (var item in evnt) { OnAlertRecievedEvent(item); } } } catch (Exception ex) { ExceptionHandler.handleException(ex); } }
The average message received size is 149594 character but sometimes I only get 8183 character of data.
Environment
Explanation
My netmq client is receiving half data from the server. This happens around 0.1 % times. Since I am receiving data of a model I am unable to deserialize the data.
Code
The average message received size is 149594 character but sometimes I only get 8183 character of data.