public void Process(K transformation) { try { T message; source.BeginTransaction(); message = source.Read(); if (message == null) { return; } foreach (var sink in sinks) { try { sink.BeginTransaction(); sink.Write(message, transformation); sink.Commit(); } catch { sink.Rollback(); throw; } } source.Commit(); } catch { source.Rollback(); throw; } }