Response to a Get operation when the caller no longer waits
-
Saturday, February 25, 2012 7:56 AM
Hi,
how should I handle following situation:
- one service (let say ServiceA) requests the get operation on another service (ServiceB). In serviceA:serviceB.Get getState = new serviceB.Get(); getState.TimeSpan = TimeSpan.FromSeconds(1.0); _serviceBPort.Post(getState); yield return Arbiter.Choice(serviceB.ResponsePort, delegate(serviceB.ServiceBState state) { //some action }, delegate(Fault failure) { LogError("Get serviceB state failed" + failure.Reason);} );- serviceB is busy processing request and doesn't respond in one second:
public virtual IEnumerator<ITask> GetHandler(Get getState) { TimeConsumingFunction(); getState.ResponsePort.Post(_state); yield break; }- timeout occurs in serviceA and serviceA continues,
- serviceB finnaly is ready to send a message but no one waits for it and I've got a warning first:
"DsspForwarder: Received unsolicited response(http://schemas.microsoft.com/xw/2004/10/dssp.html:GetResponse) from :"
and then error:
"### DsspForwarder: OutboundException. Exception: System.TimeoutException: Upłynął limit czasu operacji.. || Action: http://schemas.microsoft.com/xw/2004/10/dssp.html:GetResponse."I would like to handle this error in serviceB (preferably) and continue. How and where should I catch this?
Best regards
Piotr
All Replies
-
Wednesday, March 14, 2012 7:16 PMOwner
I believe this explains how to handle this...
http://blogs.msdn.com/b/cellfish/archive/2011/08/02/ccr-tips-and-tricks-part-22.aspx
- Proposed As Answer by Gershon ParentOwner Wednesday, March 14, 2012 7:16 PM
- Marked As Answer by PRS3 Monday, March 19, 2012 11:10 AM
-
Monday, March 19, 2012 11:10 AM
Hi, the soulution you provided is from CCR but helps anyway :) I would recommend that blog (especially CCR tips and tricks) to all. Thanks.
Regards
Piotr

