Skip to content

Commit

Permalink
fix: performance when multiple messages scheduled need to be consumed
Browse files Browse the repository at this point in the history
  • Loading branch information
titouancreach committed Nov 8, 2022
1 parent 6b543dc commit 3992ef3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ where attributes.Cast<SubjectAttribute>().FirstOrDefault()?.Subject == message.S

var body = JsonSerializer.Deserialize((JsonElement)concreteBodyType, type);


var publisher = scope.ServiceProvider.GetRequiredService<IRedisStreamPublisher>();

var task = (Task?)publisher
Expand Down Expand Up @@ -221,6 +220,8 @@ where attributes.Cast<SubjectAttribute>().FirstOrDefault()?.Subject == message.S
await db.SortedSetRemoveAsync("SCHEDULED_MESSAGES", topMessage.Element);
await db.LockReleaseAsync($"LOCK:{topMessage.Element}", _serviceName);
}

continue;
}
}

Expand Down

0 comments on commit 3992ef3

Please sign in to comment.