ws-reliablemessaging

WCF WebService - Is there a way to determine that client received response?

与世无争的帅哥 提交于 2019-12-23 19:02:09
问题 Lets say I have a WCF service that a client can use to receive message from some server side message queue. As an example, lets say there is a server-side queue of email in a data table: ID | MESSAGE_TEXT | SENT ------------------------ 1 | Hi! | N 2 | A 2nd Msg | N Lets define our service as: [OperationContract] public List<string> GetMessages() { var messages = LoadMessagesFromDb(); var messageText = (from m in messages select m.MessageText).ToArray(); return messageText; } Lets assume that

Problems with WCF reliable session (reliable messaging)

江枫思渺然 提交于 2019-12-13 16:04:35
问题 In our WCF application I am trying to configure reliable sessions. Service: <wsHttpBinding> <binding name="BindingStabiHTTP" maxBufferPoolSize="524288" maxReceivedMessageSize="2097152" messageEncoding="Text"> <reliableSession enabled="true" ordered="true" inactivityTimeout="00:10:00"/> <readerQuotas maxDepth="0" maxStringContentLength="0" maxArrayLength="0" maxBytesPerRead="0" maxNameTableCharCount="0" /> </binding> </wsHttpBinding> Client: <wsHttpBinding> <binding name=

WebService高级,可靠消息

喜欢而已 提交于 2019-12-04 17:18:56
在互联网世界中,由于软件,网络,机器等各种无稳定因素,一个SOAP消息可能会发生传输失败。如果这是一个天气预报的消息,那么失败还不会造成太大影响,但如果消息是有关银行操作,比如转账,消息的传输不可靠就可能会导致用户的损失。 因为上述原因,WS-ReliableMessaging和OASIS标准,规定了一个模块化机制,确保消息传输的可靠性。 消息在源与目的地之间,消息一定有且仅有一次传递成功。也可以规定消息最少传递一次。 消息可以存在顺序性。 消息的时效性。 接下来,我将使用Metro框架来实现可靠消息。 Metro的安装 首先,若想使用Metro引擎,就必须先安装Metro。Metro的安装步骤可以从 https://metro.java.net/guide/ch02.html#mustanga3 找到。 开启可靠消息 开启可靠消息的方法很简单,基于之前开发webservice的步骤,开启可靠消息只需要修改server端。开启方法有两种: 使用WSIT配置文件,声明policy 直接在WSDL中声明policy policy如下: <definitions ....> <wsp:Policy wsu:Id="NewWebServicePortBindingPolicy" xmlns:wsrmp="http://docs.oasis-open.org/ws-rx/wsrmp

WCF is slow when reliable session is ON and with burst async request

别来无恙 提交于 2019-11-29 08:26:33
For experiments, I created a simple "Hello World" WCF service and client using .NET 4.5 on VS2012. The server is hosted on a console application and use net.tcp binding. I wrote the client code to send a burst of async requests (a total of 700 requests) to the server. Everything went fine until I turned ON the Reliable session feature of the service. After it is ON, the service suddenly ran very slow and it took almost a minute on my machine to complete the 700 requests. I tried to fine tune the Concurrency and Throttling parameters (see below) but it didn't help. Does anyone know why this

WSHttp binding and ReliableSession / MaxRetryCount

我与影子孤独终老i 提交于 2019-11-29 08:05:53
When using a WSHttpBinding in WCF with reliableSessions enabled, my service reference updates itself to: <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true"> </reliableSession> I cannot add the maxRetryCount attribute to the reliableSession as long as the binding is configured as a WSHttpBinding. Now my question: what is the value of maxRetryCount when using a WSHttpBinding, and is there any way to change this in config; without the use of a CustomBinding? You cannot set the maxRetryCount on a standard wsHttpBinding configuration. In order to set that value, you need to

WCF is slow when reliable session is ON and with burst async request

微笑、不失礼 提交于 2019-11-28 01:52:06
问题 For experiments, I created a simple "Hello World" WCF service and client using .NET 4.5 on VS2012. The server is hosted on a console application and use net.tcp binding. I wrote the client code to send a burst of async requests (a total of 700 requests) to the server. Everything went fine until I turned ON the Reliable session feature of the service. After it is ON, the service suddenly ran very slow and it took almost a minute on my machine to complete the 700 requests. I tried to fine tune

WSHttp binding and ReliableSession / MaxRetryCount

帅比萌擦擦* 提交于 2019-11-27 06:31:27
问题 When using a WSHttpBinding in WCF with reliableSessions enabled, my service reference updates itself to: <reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="true"> </reliableSession> I cannot add the maxRetryCount attribute to the reliableSession as long as the binding is configured as a WSHttpBinding. Now my question: what is the value of maxRetryCount when using a WSHttpBinding, and is there any way to change this in config; without the use of a CustomBinding? 回答1: You