You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following implementation of IServiceRemotingClient to add a header to the IServiceRemotingRequestMessage instance:
publicclassSetOperationContextServiceRemotingClient:IServiceRemotingClient{//other IServiceRemotingClient members ommitted for brevitypublicTask<IServiceRemotingResponseMessage>RequestResponseAsync(IServiceRemotingRequestMessagerequestRequestMessage){varmessage=//build messagerequestRequestMessage.GetHeader().AddHeader("MyMessageHeader",Encoding.ASCII.GetBytes(message));returnInnerClient.RequestResponseAsync(requestRequestMessage);}}
This works perfectly in all our tests and local cluster but recently we occasionally get a FabricElementAlreadyExistsException which states: 'Header with name 'MyMessageHeader' already exists'. This issue seems to occur when the call to the service fails due to some reason so my guess is that a retry mechanism is at work here. Is this correct, and if so, should I implement IServiceRemotingClient.RequestResponseAsync() to be idempotent to prevent this issue?
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I have the following implementation of
IServiceRemotingClient
to add a header to theIServiceRemotingRequestMessage
instance:This works perfectly in all our tests and local cluster but recently we occasionally get a
FabricElementAlreadyExistsException
which states: 'Header with name 'MyMessageHeader' already exists'. This issue seems to occur when the call to the service fails due to some reason so my guess is that a retry mechanism is at work here. Is this correct, and if so, should I implementIServiceRemotingClient.RequestResponseAsync()
to be idempotent to prevent this issue?Thanks!
The text was updated successfully, but these errors were encountered: