private void ProduceCreatedSnapshot(DirectorySnapshot snapshot) { try { snapshot.CreateSnapshot(); var snapshots = snapshot.GetCreatedSnapshots(Filters); var messages = snapshots.Select(x => ReadSnapshot(x)).ToArray(); _createdQueue.Produce(_producerTokenSource.Token, messages); } catch (Exception e) { OnException?.Invoke(this, e); } }