6

I am using signalr to display messages. each message is little big html code of 100-200 lines. When coming to data display it misses few messages randomly and displays few. Code is very normal code as an example chat app but this has html code as message instead of a chat message.

Is there any common scenario with Signal r where messages are missing? Is there any common fix for it.

I am really sorry for not posting code. I am looking at some generic answer so that I can for few more research on it to fix my issue.

Kurkula
  • 6,386
  • 27
  • 127
  • 202
  • 3
    You could try turning off the `drop messages randomly` feature. Seriously though, it's highly doubtful that it is a truly *random* cause. You need to spend time investigating this more thoroughly to accurately characterise *when* and *why* messages are being dropped. One of the best ways of doing this is to *try* to create a [mcve]. It'll either help you find the issue yourself or you *will* then be able to post code that demonstrates the problem to other people. – Damien_The_Unbeliever May 04 '16 at 06:40
  • Where can I configure drop messages feature? – Kurkula May 04 '16 at 17:57
  • 2
    The first sentence of my comment was meant to be a joke. Ignore it, please, and just read the rest. – Damien_The_Unbeliever May 05 '16 at 06:07
  • 1
    You did not actually believe that there is a `drop messages randomly` feature did you? (: Are your messages objects or just strings? I would suggest that you put them in objects. i.e. MyHtmlMessageObject type (your own class) and this could have a message id. With that you could track a list of message ids sent out and a list of ids received. That will give you some clue about "dropped" messages, and help in investigating the issue. – DDan May 06 '16 at 05:10
  • Thanks for pointing to good point. Will object size matters to drop few messages? – Kurkula May 06 '16 at 05:13
  • 1
    I think you should try to reproduce the bug with small messages, maybe size/network load is the issue. – Pak May 10 '16 at 11:48
  • 1
    As you are expecting some generic answer, please have a look into this link http://stackoverflow.com/questions/22197129/how-to-do-guaranteed-message-delivery-with-signalr I am not an expert in SignalR. But I had the same issue. – Shanthini May 11 '16 at 16:03

1 Answers1

0

** there any common scenario with Signal r where messages are missing?**

If the funcion of server will work only on stream message, something like as push notification to all client,,, the message will be lost if any client lost conection o start late conection ,

Is there any common fix for it. you will need save all the message in a data base, with a foreing key of a room and that room will need other Foreig Key of who user be in the room