2

I've been reading about reliable messaging and have a few questions that I haven't been able to find the answer to:

  1. Why isn't RM enabled by default in wsHttpBinding (and others as well)? In what case would you not want to use reliable messaging? I know in streaming scenarios it doesn't really make sense, but I can't imagine an instance where you would want to send a message/data and not receive it.

  2. Which config file takes precedence if the server's and a client's do not match? I assume if they aren't both <reliableSession enabled="true" /> RM wouldn't be working (would that cause any errors to be thrown?), but what about things like ordered and inactivityTimeout?

Marcus
  • 5,407
  • 3
  • 31
  • 54

1 Answers1

0

Unless both server and client have set <reliableSession enabled="true" /> and session is not enabled on the server, it will not use reliable messaging.

I try avoiding reliable messaging because of its overhead. As far as I am concerned, if an operation is TwoWay, successful reply will guarantee delivery - although not the other way around always true.

Aliostad
  • 80,612
  • 21
  • 160
  • 208
  • I am implementing a "Pinging" service to ensure clients are up and running. So RM would be a good thing to have in this case, yes? – Marcus Mar 14 '11 at 15:24
  • I would use just a simple method such as `GetServerDate()` which is light weight and I just call and if I get the response (current date) then I know it is up and running. – Aliostad Mar 14 '11 at 15:27
  • The Ping method also updates the server with information about the client though. At the moment I'm not using RM, and I get a few "Client is unable to finish the security negotiation within the configured timeout" and other random error messages a day from the client machines. I'm hoping RM will solve this. – Marcus Mar 14 '11 at 15:31
  • Don't! RM is for banks so that when transferring money, they know if it has reached destination or not - so even if connection is cut off and it reaches destination but server cannot send back response. RM is not gonna solve the problem you are having. – Aliostad Mar 14 '11 at 15:39
  • 1
    @G_M: a `Ping` method doesn't help at all - all it can tell you is that it succeeded (or failed) - it cannot make any statement about whether your next service call, a fraction of a microsecond later, is going to work or not. Such Ping methods are totally useless in that regard.... – marc_s Mar 14 '11 at 15:42
  • Hm. I thought that's what WCF's RM was for; If the client doesn't receive the "acknowledgement" from the server it will try again. So I should implement my own version of "reliability" within my app? – Marcus Mar 14 '11 at 15:46
  • @marc_s: I used the term "Ping" lightly here. The client updates the server with information about itself during the "ping," and it's to let the server know that the client is still active within the last 5 minutes (in my case). – Marcus Mar 14 '11 at 15:52