Skip to content

Commit

Permalink
Removed unneeded idempotency keys set from EventSource
Browse files Browse the repository at this point in the history
  • Loading branch information
stidsborg committed Nov 15, 2023
1 parent 129b6b2 commit 1d34ff9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Core/Cleipnir.ResilientFunctions/Messaging/EventSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ public class EventSource : IReactiveChain<object>, IDisposable
private readonly TimeSpan _pullFrequency;
private readonly ISerializer _eventSerializer;

private readonly HashSet<string> _idempotencyKeys = new();
private int _deliverOutstandingEventsIteration;
private EventProcessingException? _thrownException;

Expand Down Expand Up @@ -101,12 +100,6 @@ private async Task DeliverOutstandingEvents(bool deliverDespiteNoActiveSubscript
var storedEvents = await _eventsSubscription!.PullNewEvents();
foreach (var storedEvent in storedEvents)
{
if (storedEvent.IdempotencyKey != null)
if (_idempotencyKeys.Contains(storedEvent.IdempotencyKey))
continue;
else
_idempotencyKeys.Add(storedEvent.IdempotencyKey);

var deserialized = _eventSerializer
.DeserializeEvent(storedEvent.EventJson, storedEvent.EventType);

Expand Down

0 comments on commit 1d34ff9

Please sign in to comment.