Skip to content

Instantly share code, notes, and snippets.

@marcofranssen
Created November 19, 2011 17:31
Show Gist options
  • Save marcofranssen/1379097 to your computer and use it in GitHub Desktop.
Save marcofranssen/1379097 to your computer and use it in GitHub Desktop.
Gist realted to my "Auto retry concurrent commands with ncqrs" blogpost on http://marcofranssen.nl
public class SafeCommandService : CommandService
{
public override void Execute(ICommand command)
{
try
{
base.Execute(command);
}
catch(ConcurrencyException ex)
{
Execute(command);
//Log retry executed
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment