-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
Hi,
I have the following implementation of IServiceRemotingClient
to add a header to the IServiceRemotingRequestMessage
instance:
public class SetOperationContextServiceRemotingClient : IServiceRemotingClient
{
//other IServiceRemotingClient members ommitted for brevity
public Task<IServiceRemotingResponseMessage> RequestResponseAsync(IServiceRemotingRequestMessage requestRequestMessage)
{
var message = //build message
requestRequestMessage.GetHeader().AddHeader("MyMessageHeader", Encoding.ASCII.GetBytes(message));
return InnerClient.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!
gastonmuijtjens, kaylumah, ivarwolters, arjensteinhauer and mikevandonselaar
Metadata
Metadata
Assignees
Labels
No labels